Data processing device with improved direct memory access

ABSTRACT

A microcomputer is disclosed which is specifically designed for computation-intensive applications. The microcomputer contains on-chip RAM and ROM, and has peripheral ports for access of external memory and input/output functions. The microcomputer has a central processing unit with a floating-point multiplier in parallel with an arithmetic logic unit, and uses a plurality of registers as multiple accumulators. The central processing unit further contains two auxiliary arithmetic logic units, in parallel with one another, and which are each connected to a set address lines in a memory bus; the two auxiliary arithmetic logic units thus generate two separate memory addresses in parallel. The memory bus also contains one set of data lines, connected to the RAM and ROM, and to the central processing unit. The on-chip RAM and ROM are responsive to the two sets of address lines in time-multiplexed fashion to provide memory access via data lines twice per system clock cycle. A second memory bus is also connected to the on-chip RAM and ROM, and to the peripheral ports, so that access to one of the memory elements via said first memory bus can occur simultaneously with, and independently from, access to another of said memory elements via said second memory bus. The on-chip memory and external memory are all mapped into a single memory address space, which allows simultaneous program and data fetches via the two memory buses, or a program and data fetch during the same cycle using the first time-multiplexed bus. Memory-mapped input and output functions are performed by on-chip peripherals, which are connected to a peripheral bus connected to one of the peripheral ports of the microcomputer. The peripheral bus allows for substantial flexibility relative to the configuration of the microcomputer.

This application is a continuation of application Ser. No. 07/025,443,filed 03/13/87, abandoned.

This application is related to application Ser. No. 025,417, Ser. No.025,756, and Ser. No. 025,413, all filed contemporaneously herewith.

This invention relates to data processing devices, and specifically tothe architecture of single-chip microcomputers in connection with directmemory access.

BACKGROUND OF THE INVENTION

A microprocessor device is a central processing unit or CPU for adigital processor which is usually contained in a single semiconductorintegrated circuit or "chip" fabricated by MOS/LSI technology, as shownin U.S. Pat. No. 3,757,306 issued to Gary W. Boone and assigned to TexasInstruments. The Boone patent shows a single-chip 8-bit CPU including aparallel ALU, registers for data and addresses, an instruction registerand a control decoder, all interconnected using the von Neumannarchitecture and employing a bidirectional parallel bus for data,address and instructions. U.S. Pat. No. 4,074,351, issued to Gary W.Boone, and Michael J. Cochran, assigned to Texas Instruments, shows asingle-chip "microcomputer" type device which contains a 4-bit parallelALU and its control circuitry, with on-chip ROM for program storage andon-chip RAM for data storage, constructed in the Harvard architecture.The term microprocessor usually refers to a device employing externalmemory for program and data storage, while the term microcomputer refersto a device with on-chip ROM and RAM for program and data storage. Indescribing the instant invention, the term "microcomputer" will be usedto include both types of devices, and the term "microprocessor" will beprimarily used to refer to microcomputers without on-chip ROM; since theterms are often used interchangeably in the art, however, it should beunderstood that the use of one or the other of these terms in thisdescription should not be considered as restrictive as to the featuresof this invention.

Modern microcomputers can be grouped into two general classes, namelygeneral-purpose microprocessors and special-purposemicrocomputers/microprocessors. General purpose microprocessors, such asthe M68020 manufactured by Motorola, Inc., are designed to beprogrammable by the user to perform any of a wide range of tasks, andare therefore often used as the central processing unit in equipmentsuch as personal computers. Such general-purpose microprocessors, whilehaving good performance for a wide range of arithmetic and logicalfunctions, are of course not specifically designed for or adapted to anyparticular one of such functions. In contrast, special-purposemicrocomputers are designed to provide performance improvement forspecific predetermined arithmetic and logical functions for which theuser intends to use the microcomputer. By knowing the primary functionof the microcomputer, the designer can structure the microcomputer insuch a manner that the performance of the specific function by thespecial-purpose microcomputer greatly exceeds the performance of thesame function by the general-purpose microprocessor regardless of theprogram created by the user.

One such function which can be performed by a special-purposemicrocomputer at a greatly improved rate is digital signal processing,specifically the computations required for the implementation of digitalfilters and for performing Fast Fourier Transforms. Because suchcomputations consist to a large degree of repetitive operations such asinteger multiply, multiple-bit shift, and multiply-and-add, aspecial-purpose microcomputer can be constructed specifically adapted tothese repetitive functions. Such a special-purpose microcomputer isdescribed in U.S. Pat. No. 4,577,282, assigned to Texas Instruments Inc.The specific design of a microcomputer for these computations hasresulted in sufficient performance improvement over general purposemicroprocessors to allow the use of such special-purpose microcomputersin real-time applications, such as speech and image processing.

Digital signal processing applications, because of their computationintensive nature, also are rather intensive in memory access operations.Accordingly, the overall performance of the microcomputer in performinga digital signal processing function is not only determined by thenumber of specific computations performed per unit time, but also by thespeed at which the microcomputer can retrieve data from, and store datato, system memory. Prior special-purpose microcomputers, such as the onedescribed in said U.S. Pat. No. 4,577,282, have utilized modifiedversions of a Harvard architecture, so that the access to data memorymay be made independent from, and simultaneous with, the access ofprogram memory. Such architecture has, of course, provided foradditional performance improvement.

However, the use of a Harvard architecture instead of a von Neumannarchitecture also provides certain limitations, some of which mayadversely impact the performance of the microcomputer in digital signalprocessing applications. For example, the data and program memory, sincethey are accessed by different buses, generally must reside in separateaddress spaces, if not in separate physical locations. Accordingly, afirst dedicated memory must be provided for data memory and a seconddedicated memory must be provided as program memory in the Harvardarchitecture. This limits the flexibility of the microcomputer, bypreventing the use of unutilized data memory for program storage, andvice-versa.

Direct memory access (DMA) is another useful function for specialpurpose microcomputers, especially those directed to digital signalprocessing. An on-chip DMA controller is often used in microcomputershaving DMA capability, so that the DMA operation can occur independentlyfrom the central processing unit. However, regardless of the choice ofHarvard or von Neumann architecture, the use of either program or databuses for the DMA operation may require that the DMA must wait forprogram or data access before continuing. In the case of a digitalsignal processor, the program and data buses are both heavily used. IfDMA is given the lowest priority to the program and data buses, the DMAperformance of the microcomputer can be quite slow.

It is therefore an object of this invention to provide a microcomputerwhich has a separate DMA bus connected to an on-chip DMA controller,with the DMA bus also connected to on-chip and external memory, so thatthe DMA operation is not limited by program and data access.

It is a further object of this invention to provide such a microcomputerwhich has such a separate DMA bus, and which also has a single memoryaddress space which can be flexibly partitioned by the user into dataand program storage, so as to maximize the ability of the DMA operationto proceed without conflict with data and program access.

Even with a separate DMA bus which can be used to access memory withoutgaining priority on the program, data, or program/data buses, if theaccess requested by the DMA bus is directed to the same memory as thatto which access is requested by such other buses, the DMA will stillhave to wait.

It is therefore another object of this invention to provide such amicrocomputer which has multiple memory elements within a single memoryspace, each of which is connected to the separate DMA bus, so that DMArelative to one memory may proceed simultaneously with a program or dataaccess to another of the memory elements.

Further objects and advantages of the instant invention will becomeapparent to those of ordinary skill in the art having reference to thefollowing specification, together with its drawings.

SUMMARY OF THE INVENTION

The invention may be incorporated into a microcomputer which has on-chipmemory, and which has a direct memory access (DMA) controller forcommunicating blocks of data within said on-chip memory and to and fromexternal terminals of the device. A DMA bus is provided within themicrocomputer, and is connected to the DMA controller and to the on-chipmemory so that the on-chip and external memory may be addressed by wayof the DMA bus, and data written to or read from the addressed location.The DMA bus is a separate bus from the address and data bus used withinthe microcomputer for program and data communication, so that the DMAcontroller is not required to share either the program or the data buswith the rest of the microcomputer. In this way, the DMA operation canproceed in a more efficient manner. A plurality of memory elements maybe provided in the on-chip memory, so that DMA may access one of thememory elements via the DMA bus while another of the memory elements isbeing accessed for normal program and data fetches and stores. Memorycontrol logic is provided to arbitrate priority in the event that DMAaccess and program/data access to one of the on-chip memory elements aresimultaneously being attempted.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an electrical diagram, in block form, of a microcomputerconstructed according to the invention.

FIG. 2 is an electrical diagram, in block form, of the centralprocessing unit of the microcomputer of FIG. 1.

FIG. 2a is an electrical diagram, in block form, of an auxiliaryarithmetic logic unit incorporated in the central processing unit ofFIG. 2.

FIGS. 2b and 2c are flow diagrams of certain computations useful in thecircular addressing mode performable by the microcomputer of FIG. 1.

FIG. 3 is an electrical diagram, in block form, of the peripheral portsof the microcomputer of FIG. 1.

FIG. 4 is an electrical diagram, in block form, of the controller of themicrocomputer of FIG. 1.

FIG. 4a is a timing diagram illustrating the pipelining of instructioncodes performed by the controller of FIG. 4.

FIG. 5 is an electrical diagram, in schematic form, of logic within thecontroller of FIG. 4, useful in the arbitration of accesses to variousmemory entities within the microcomputer of FIG. 1.

FIG. 5a is a timing diagram of memory accesses performed within themicrocomputer of FIG. 1, illustrating the operation of the logic of FIG.5.

FIGS. 6a through 6d are electrical diagrams, in block form, of portionsof the microcomputer of FIG. 1, showing snapshots in time of theexecution of an exemplary instruction.

FIG. 7 is an electrical diagram, in block form, of the instruction cacheof the microcomputer of FIG. 1.

FIG. 8 is an electrical diagram, in block form, of the DMA controller ofthe microcomputer of FIG. 1.

FIG. 9 is an electrical diagram, in block form, of the peripheralmodules and peripheral bus of the microcomputer of FIG. 1.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Referring now to FIG. 1, the architecture of a microcomputer 10 isshown, said microcomputer being specially adapted to digital signalprocessing and incorporating the instant invention. The major functionalblocks of microcomputer 10 are constituted by central processing unit(CPU) 12, controller 14, and direct memory access (DMA) controller 22.The memory contained in microcomputer 10 according to this embodiment ofthe invention includes random access memories (RAMs) 16 and 18, andread-only memory (ROM) 20. RAMs 16 and 18 contain, in this embodiment,2¹⁰, or 1K, words; ROM 20 contains 2¹², or 4K, words. Externalconnection is made by way of interface ports 24 and 26, which multiplexvarious bus signals onto external terminals of microcomputer 10 andwhich provide special purpose signals for communication to externaldevices which are to receive and send data via such external terminals.Connected to interface port 26 is peripheral bus 28, which is adapted tobe connected to various peripheral function blocks as will be explainedhereinbelow.

Data communication within microcomputer 10 can be effected by way ofdata bus 30. Data bus 30 contains a set of data lines 30d which arededicated to the communication of data signals among memories 16, 18 and20, interface ports 24 and 26, and CPU 12. In this embodiment of theinvention, data bus 30 contains thirty-two data lines in set 30d;accordingly, the data signals communicated among memories 16, 18 and 20,interface ports 24 and 26, and CPU 12 are considered as thirty-two bitwords. Data bus 30 further contains a first set of address lines 30a anda second set of address lines 30b, both of which are for communicationof address signals corresponding to memory locations in memories 16, 18and 20. In this embodiment of the invention, data bus 30 containstwenty-four address lines in each of sets 30a and 30b. Address lines 30aand 30b are also connected among CPU 12, interface ports 24 and 26, andmemories 16, 18 and 20. As is evident from FIG. 1, memories 16, 18 and20 each have two ports 32a and 32d. Each of ports 32a are connected toaddress lines 30a and 30b of data bus 30, and receive the addresssignals presented thereupon to provide access to the correspondingmemory location by way of port 32d to data lines 30d of data bus 30.

Microcomputer 10 also effects communication by way of program bus 34.Similarly as data bus 30, program bus 34 contains a set of data lines34d connected to ports 32d of memories 16, 18 and 20. Data lines 34d ofprogram bus are also connected to interface ports 24 and 26, and tocontroller 14. Program bus 34 further contains a set of address lines34a, which are connected to ports 32a of memories 16, 18 and 20, tointerface ports 24 and 26, and to controller 14. Also connected toaddress bus 34 is instruction cache 36 which also has ports 32a and 32dconnected to address lines 34a and data lines 34d, respectively.Instruction cache 36 is a small (64 word) high speed memory which isused to retain the most recently used instruction codes so that, ifexternal memory devices are used for program storage, the retrieval ofrepetitively used instructions can be effected at the same rate as frommemories 16, 18 and 20. Detailed construction and operation ofinstruction cache 36 is given hereinbelow. Controller 14 contains suchcircuitry as required to decode instruction codes received on data lines34d of program bus 34 into control signals which control the specificlogic circuitry contained in all blocks of microcomputer 10. FIG. 1illustrates lines SEL₁₆, SEL₁₈, SEL₂₀, SEL₂₄ and SEL₂₆ which carrycertain of these control signals to control access of microcomputer 10to memories 16, 18, and 20, and peripheral ports 24 and 26,respectively; other such control signals generated by controller 14 arenot shown in FIG. 1, for purposes of clarity. Because of its connectionto instruction cache 36 and to controller 14, program bus 34 is usedprimarily for the addressing and communication of instruction codescontained in memories 16, 18 and 20. According to the invention, suchinstruction codes can reside in any of memories 16, 18 and 20, or inexternal memory, without designation of any specific locations asdedicated to program memory.

DMA controller 22 is connected to memories 16, 18 and 20 by way of DMAbus 38. Similarly as data bus 30 and program bus 34, DMA bus 38 has aset of data lines 38d which are connected to ports 32d of memories 16,18 and 20. DMA bus 38 further has a set of address lines 38a connectedto ports 32a of memories 16, 18 and 20. DMA controller 22 is alsoconnected to peripheral bus 28, and to interface port 26 via peripheralbus 28. DMA controller 22 effects direct memory access operations, bywhich blocks of data stored within the memory space of microcomputer 10may be moved from one area of memory (the source) to another(destination). The source area of memory may be within memories 16, 18or 20, or in memory devices external to microcomputer 10 which areconnected to the terminals served by interface port 24, and thedestination of the block of data may be in all of such memories (exceptof course ROM 20). It is apparent from the construction of microcomputer10 as shown in FIG. 1, and from the description given hereinbelow, thatsuch DMA operations may be effected by DMA controller 22 inmicrocomputer 10 without requiring the intervention of CPU 12.

Ports 32a are primarily multiplexers, so that selection of one set ofaddress lines 30a, 30b, 34a, or 38a for connection to its associatedmemory 16, 18 or 20 can be effected. Similarly, each of ports 32d areconnected to data lines 30d of data bus 30, for communication of thedata stored (or to be stored) by the addressed memory location. Memories16, 18 and 20 each contain an address decoder 33, connected to its port32a, for decoding the memory address signal presented on the selectedone of said address lines 30a, 30b, 34a, or 38a in a manner well knownin the art. Based on the output from address decoder 33, access isgranted to the memory location specified by the selected address signal.RAMs 16 and 18, and ROM 20, are all constructed as are well known in theart, so that the selected memory location is sensed and/or written basedupon the output of address decoder 33 therewithin. As is also well knownin the art for such memories, ports 32d provide a high-impedance outputto the data lines of buses 30, 34 and 38 connected thereto when notselected, thereby preventing data conflicts on buses 30, 34 and 38.

Each of the sets of address lines in data bus 30, program bus 34 and DMAbus 38 consist of twenty-four conductors in the preferred embodiment ofthis invention. Accordingly, the maximum number of memory locationsaddressable by way of the sets of address lines in data bus 30, programbus 34 and DMA bus 38 is 2²⁴ words (sixteen Mwords) of thirty-two bits.However, since the total number of words in memories 16, 18 and 20 is6K, a large amount of the addressable memory space of microcomputer 10may reside in memory devices external to microcomputer 10. Such externalmemory will of course also have address decoding capability, similar tothe on-chip memories 16, 18 and 20, and will respond to the generatedaddress signals on the address lines of buses 30, 34 and 38 in a similarfashion. According to the instant invention, a single memory addressspace is provided for microcomputer 10, so that a given address signalpresented on any given set of address lines of buses 30, 34 and 38 willaddress a memory location in only one of memories 16, 18 and 20.Therefore, using the example of address lines 30a being selected byports 32a, a given address signal on address lines 30a will correspondto a memory location in only one of memories 16, 18 and 20, or inexternal data, program or input/output memory. It should be noted thatmicrocomputer is organized in such a fashion that it is preferable thatexternal data and program memory be accessed by way of peripheral port24, and that external input/output memory be accessed by way ofperipheral port 26.

Peripheral bus 28 is connected between interface port 26 and variousperipheral functions. Peripheral bus is therefore selectivelyconnectable to any one of buses 30, 34 and 38, depending upon thecontrol of peripheral port 26 by controller 14. In this manner,peripheral bus 28 appears to the remainder of microcomputer 10 as anoff-chip bus. This provides for such functions as normally provided byperipheral devices to be incorporated into microcomputer 10;communications with such peripheral devices will be enacted by theremainder of microcomputer 10 in much the same way as an off-chipdevice. By way of example, microcomputer 10 of FIG. 1 has timer 40,serial port 42, and format converter 44 attached to peripheral bus 28;as discussed above, DMA controller 22 is also connected to peripheralbus 28. Similarly as the other buses described above, peripheral bus 28contains data lines 28d and address lines 28a. In contrast to thecommunication between memories 16, 18 and 20 and the remainder ofmicrocomputer 10 connected to buses 30, 34 and 38, however, addresslines 28a of peripheral bus 28 are used to select one of saidperipherals 40, 42, or 44 connected thereto to receive or transmit datafrom or to data lines 28d of peripheral bus 28. In addition, as will bedescribed below, control registers in DMA controller 22 are alsoaccessed by way of peripheral bus 28.

Referring now to FIG. 2, the construction and operation of CPU 12 willbe explained in detail. CPU 12 contains a dedicated multiplier 46, anarithmetic logic unit (ALU) 48, data registers 50a through 50h(collectively referred to as data registers 50), auxiliary arithmeticlogic units (ARAUs) 52a and 52b, auxiliary data registers 54a through54h (collectively referred to as data registers 54), data bus controller56, and a bank of control registers (including, but not limited to,index registers 68a and 68b, block register 70 and status register 71)which will be further described below.

One of the inputs to multiplier 46 is operable to receive data fromeither CPU bus 60a or register bus 62a via multiplexer 64a, and theother of the inputs to multiplier 46 is operable to receive data fromeither CPU bus 60b or register bus 62b, via multiplexer 64b. Similarly,ALU 48 performs operations on its two inputs, one of which is operableto receive data from either CPU bus 60a or register bus 62a viamultiplexer 64c, and the other of the inputs to multiplier 46 isoperable to receive data from either CPU bus 60b or register bus 62b,via multiplexer 64d. Multiplexers 64a through 64d are controlled bycontroller 14, according to the instruction code to be executed by CPU12.

Multiplier 46 is a floating-point multiplier as is well known in theart, in effect containing both a hardware multiplier (for multiplicationof the mantissas) and an arithmetic logic unit (for addition of theexponents). Multiplier 46 in the preferred embodiment of the inventionis of the size which can perform an integer multiplication to produce athirty-two bit result, and which alternatively can perform afloating-point multiplication to produce a forty-bit result, consideringthirty-two of the bits as the mantissa of the floating-point operands,and the other eight bits as the exponent of the floating-point operands.ALU 48 is an arithmetic logic unit constructed according to any one of anumber of well known configurations which can perform integer andfloating-point addition and subtraction on up to two forty bit binarynumbers. As will be described in further detail hereinbelow, theparallel combination of multiplier 46 and ALU 48 allows CPU 12 toperform operations using both functions simultaneously, which providesfor rapid calculation of such operations as multiply-and-accumulateinstructions. The outputs of multiplier 46 and ALU 48 are each connectedto data registers 50, so that the results of the operations executed byeach of multiplier 46 and ALU 48 can be stored in selected ones of saiddata registers 50.

Data registers 50 are forty-bit registers, used to store data in integeror floating-point format, depending upon the user's application. Whenstoring information in floating-point format, the eight most significantbits are considered as the exponent, and the thirty-two leastsignificant bits are considered as the mantissa. The primary function ofdata registers 50 is an accumulator function, so that the plurality ofdata registers 50 in effect provides CPU 12 with multiple accumulators.Data registers 50 are also connected to register buses 62a and 62b,which can provide output to data bus 30 via data bus controller 56, andbe provided as inputs again to multiplier 46 and ALU 48. Accordingly, amultiply and accumulate instruction can be easily and efficientlyimplemented by CPU 12. For example, the result of a multiplication bymultiplier 46 can be input to ALU 48 via one of data registers 50 andregister bus 62a, for addition to a prior result stored in another oneof data registers 50 and applied to ALU 48 via register bus 62b. Theoutputs of multiplier 46 and ALU 48 are also connected to the inputs ofmultiplexer 66, which is also controlled by controller 14. The output ofmultiplexer 66 is connected to auxiliary registers 54, so that theresults of the operation of either multiplier 46 or ALU 48 can be storedin a selected one of auxiliary registers 54, or in the bank of controlregisters including index registers 68a and 68b, block register 70 andstatus register 71.

Auxiliary registers 54 are thirty-two bit registers used in conjunctionwith ARAUs 52 to generate addresses for application to address lines 30aand 30b of data bus 30, and for computation of subsequently usedaddresses stored in auxiliary registers 54. Auxiliary registers 54 areconnected to one input of each of ARAUs 52a and 52b by way of auxiliaryregister buses 65a and 65b, respectively. Each of ARAUs 52a and 52b alsohave an input connected to controller 14, an input connected to indexregisters 68a and 68b, and an input connected to block register 70, allfor receiving address modification signals depending upon the addressmode specified by the instruction code being executed. ARAUs 52a and 52bhave an output connected to address lines 30a and 30b of data bus 30,respectively, upon which ARAUs 52a and 52b present a memory addresssignal. In addition, ARAUs 52a and 52b have an output connected to buses67a and 67b, respectively, for storing in selected ones of auxiliaryregisters 54 the results of modifications generated in the process ofmemory addressing, as will be explained below. As is evident byreference to FIG. 1, and as well known in the art, instruction codesexecutable by microcomputer 10 addresses memories 16, 18 and 20, as wellas external memory via peripheral ports 24 and 26, in a plurality ofways; examples of such addressing include addressing of an individualregister 50 and 54 in CPU 12 and direct addressing of a location inmemories 16, 18 and 20, and the well-known immediate and relativeaddressing modes.

Indirect memory addressing is facilitated by ARAUs 52a and 52, inconjunction with auxiliary registers 54. As is well known, indirectaddressing in microcomputers is a mode of memory addressing where theaddress of the memory location is contained in the specified location.An example of indirect memory addressing is an instruction to themicrocomputer to "address the memory location specified by the contentsof register 50a." Indirect addressing allows registers 54 to be used asdynamic memory address pointers, which allow the computation of a memorylocation by CPU 12 (and its storage in one of registers 54) without thenecessity of changing the contents of a program memory location. Inaddition, ARAUs 52a and 52b are operable to utilize a displacement codegenerated from the instruction code, which modifies the computation ofthe indirect address by ARAUs 52a and 52b. The displacement code is aneight-bit code generated by controller 14 in its decoding of theinstruction code, and is input to one of the inputs of each of ARAUs 52aand 52b. CPU 12 interprets the absence of a displacement signal as animplied value of one, which is useful to automatically increment ordecrement the contents of the register 54 used in a repetitiveoperation. As such, ARAUs 52a and 52b are primarily used in theaddressing of data locations in RAMs 16 and 18, and in external RAM usedas data memory; as shown in FIG. 1, addresses generated by ARAUs 52a and52b on address lines 30a and 30b of data bus 30 can of course alsoaccess ROM 20. ARAUs 52a and 52b are thus operable to perform thenecessary integer addition or subtraction operation upon the contents ofthe one of registers 54 connected to one of its inputs and upon thedisplacement code generated by controller 14. Table 1 lists a number ofthe types of indirect addressing modes supported in part by ARAUs 52aand 52b in conjunction with registers 54 and controller 14. It should benoted that the instruction codes stored in the program memoryportions/locations of memories 16, 18 and 20 (or externally) contain afive-bit code which specifies the memory addressing mode desired,including those listed in Table 1. In Table 1, "add" specifies thememory location to be addressed, "ARn" specifies the contents of one ofregisters 54, and "disp" the value of the displacement code generated bycontroller 14. The updated value of the contents of one of auxiliaryregisters 54 is denoted by "ARn'" in Table 1.

                  TABLE 1                                                         ______________________________________                                        Description          Operation                                                ______________________________________                                        Indirect w/pre-displacement add                                                                    add =    ARn + disp                                      Indirect w/pre-displacement subtract                                                               add =    ARn - disp                                      Indirect w/pre-displacement                                                                        add =    ARn + disp                                      add/modify           ARn' =   ARn + disp                                      Indirect w/pre-displacement                                                                        add =    ARn - disp                                      subtract/modify      ARn' =   ARn - disp                                      Indirect w/post-displacement                                                                       add =    ARn                                             add/modify           ARn' =   ARn + disp                                      Indirect w/post-displacement                                                                       add =    ARn                                             subtract/modify      ARn' =   ARn - disp                                      ______________________________________                                    

CPU 12 contains index registers 68a and 68b, also connected to theoutput of multiplexer 66, connected to register buses 62a and 62b, andand are also directly connected to the inputs of ARAUs 52a and 52b whichreceive the displacement codes from controller 14. Controller 14 ofcourse will control the application of index register 68a, indexregister 68b, or the displacement code to this other input of ARAUs 52aand 52b. Index registers 68a and 68b can be loaded by ALU 48 for storingan index value to be utilized in the indexed indirect addressing ofmemories 16, 18 and 20 (as well as external memory), by way of ARAUs 52aand 52b. Table 2 contains the indexed indirect addressing modes which,responsive to corresponding instruction codes received and decoded bycontroller 14, are executable by ARAUs 52a and 52b. Similarly as theaddressing modes listed in Table 1, these individual addressing modesare enabled by unique ones of five-bit codes in the instruction code.The term "IRm" in Table 2 indicates the contents of one of indexregisters 68a and 68b.

                  TABLE 2                                                         ______________________________________                                        Description          Operation                                                ______________________________________                                        Indirect w/pre-index add                                                                           add =    ARn + IRm                                       Indirect w/pre-index subtract                                                                      add =    ARn - IRm                                       Indirect w/pre-index add/modify                                                                    add =    ARn + IRm                                                            ARn' =   ARn + IRm                                       Indirect w/pre-index subtract/modify                                                               add =    ARn - IRm                                                            ARn' =   ARn - IRm                                       Indirect w/post-index add/modify                                                                   add =    ARn                                                                  ARn' =   ARn + IRm                                       Indirect w/post-index subtract/modify                                                              add =    ARn                                                                  ARn' =   ARn - IRm                                       ______________________________________                                    

Referring now to FIG. 2a, the construction of ARAU 52a is illustrated indetail; it is of course understood that ARAU 52b is similarlyconstructed. As shown in FIG. 2, ARAU 52a receives at one inputauxiliary register bus 65a, which is connected to one input ofadder/subtractor 80. Multiplexer 82 receives three input signals; one ofthese input signals is the displacement code generated by controller 14,and the other two input signals are the contents of index registers 68aand 68b. Multiplexer 82 is controlled by controller 14, responsive tothe instruction code being executed, to select one of these three inputsfor application to the second input of adder/subtractor 80.

Adder/subtractor 80 is a multiple-stage arithmetic logic unit as is wellknown in the art, which is capable of performing either a full-carry addor subtract. Controller 14 controls whether or not adder/subtractor 80performs the add or subtract operation, responsive to decoding of theinstruction code containing the address mode information.Adder/subtractor 80 further contains capability for propagating thecarry information from stage to stage therewithin either in a forward orin a reverse direction. Such an adder/subtractor is described incopending U.S. patent application Ser. No. 935,465; said applicationfurther describes the benefits of reverse-carry propagation inperforming Fast Fourier Transform algorithms. Controller 14 similarlycontrols the direction of carry propagation in adder/subtractor 80,responsive to the instruction code being executed.

The output of adder/subtractor 80 is connected to one input ofmultiplexer 84, and is also connected to one input of comparator 86. Theother input of multiplexer 84 is connected directly to auxiliaryregister bus 65a, and the output of multiplexer 84 is connected toaddress lines 30a of data bus 30. Multiplexer 84 is controlled bycontroller 14 responsive to the current instruction code, forapplication of the proper value of the computed address to address lines30a of data bus 30. The output of adder-subtractor 80 is also connectedto a first input of multiplexer 88, which has its output connected tobus 67a which communicates data from ARAU 52a to a selected one ofauxiliary registers 54, for updating of the auxiliary register 54contents as desired. A second input of multiplexer 88 is connected toadder/subtractor 90. Comparator 86 and adder/subtractor 90 comprisecircular addressing logic which will be explained hereinbelow; forpurposes of the following discussion, its operation will be ignored.

By reference to FIG. 2a, the operation of ARAU 52a in accomplishing thevarious indirect addressing modes listed in Tables 1 and 2 becomesapparent. Controller 14, responsive to the instruction code beingexecuted, controls multiplexer 82 to select the desired one of indexregisters 68a or 68b ("IRm" in Table 2) or the displacement codegenerated by controller 14, for application to the contents of theselected one of auxiliary registers 54 by adder/subtractor 80. Asdescribed above, controller 14 will also control whether or notadder/subtractor 80 performs an addition or subtraction operation, andalso whether adder/subtractor 80 will calculate its output using theforward or reverse carry propagation. In the event that the desiredaddress mode is a post-index or post-displacement add or subtract,controller 14 will cause multiplexer 84 to select auxiliary register bus65a to be connected to address lines 30a of data bus 30 (correspondingto the operation "add=ARn" in Tables 1 and 2). Conversely, if thedesired indirect address mode is a pre-index or pre-displacementindirect address, controller 14 will cause multiplexer 84 to select theoutput of adder/subtractor 80 for application to address lines 30a ofdata bus 30 (corresponding to the operation "add=ARn+/-IRm/disp" inTables 1 and 2).

ARAU 52a also determines the updating of auxiliary registers 54according to the indirect addressing modes selected. Assuming that thecircular indirect addressing mode is not selected (such circularaddressing will be discussed hereinbelow), controller 14 will selectwhether or not the contents of the selected one of auxiliary registers54 are to be modified or not. In the event the desired indirectaddressing mode does not modify the contents of the auxiliary register54, controller 14 will disable (tri-state) the output of multiplexer 88,so that so that the contents of the selected one of auxiliary registers54 will not be updated. If the contents of the selected one of auxiliaryregisters 54 are to be modified with the result of the addition orsubtraction by adder/subtractor 80, controller 14 will cause multiplexer88 to select the output of adder/subtractor 80 for application to bus67a (corresponding to the operation "ARn'=ARn+/-IRm/disp" in Tables 1and 2).

It is of course apparent from the construction of CPU 12 shown in FIG. 2that the operation of the various functions can occur in parallel. Forexample, ARAU 52a can be operating in parallel with ARAU 52b since theinputs thereto are separately connected to registers 54, and tocontroller 14 (and index registers 68a and 68b). In addition, the outputof ARAU 52a is connected to address lines 30a of data bus 30 and to bus67a, while the output of ARAU 52b is connected to address lines 30b ofdata bus 30 and to bus 67b. In this manner, the operation of ARAUs 52aand 52b can occur simultaneously, without interference by or to oneanother. In addition, once the prior state of register buses 62a and 62bhave been received by multiplier 46 and ALU 48 as desired, the operationof multiplier 46 and ALU 48 can occur simultaneously not only with eachother, but also with ARAUs 52a and 52b. In this way, especially foralgorithms using repetitive operations such as multiply-and-accumulate,CPU 12 is able to achieve substantial performance improvements from suchparallel operation.

Block register 70 is connected to the output of multiplexer 66, and isconnected to register buses 62a and 62b, as well as being directlyconnected to ARAUs 52a and 52b. Block register 70 provides a "circular"feature in the indirect addressing scheme, so that a block of datamemory locations can be repetitively accessed in a looped fashion. As iswell known in the art, certain computations required for digital signalprocessing applications can be expressed in repetitive operations on ablock of stored data. For example, the computation of finite impulseresponse (FIR) digital filter functions, requires the repetition ofmultiply-and-accumulate operations on a block of data, where the resultsof the multiply-and-accumulate are stored in the memory location fromwhich one of the operands was fetched.

Referring now to FIG. 2b, the operation of circular addressing isexplained by reference to the contents of various registers in CPU 12.CPU 12 effects circular addressing by first interrogating block register70 by ALU 48 to determine the location of the most significant stored"1" data state, referred to herein as bit location "N". The value storedin block register 70 contains the number of memory locations in the datablock to be addressed circularly. The original base address of the datablock (at one end of the data block) is considered to be the contents ofthe one of auxiliary registers 54 utilized in the indirect addressingmode, with those bit locations equal to and less significant than thebit location with the most significant "1" state in block register 70 ata "0" logic state. FIG. 2b illustrates this by showing the N leastsignificant bits of the contents of auxiliary register 54a equal to "0",N being the bit location of the most-significant "1" in block register70. It should be noted that the displacement code from controller 14 mayalso be used with the circular addressing feature, replacing thecontents of index register 68a; for purposes of this example, thecontents of index register 68a will be used in describing the operationof the circular addressing feature. As a result, the end of the block ofstored data can be thought of as the original base address (stored inauxiliary register 54a) with bit locations N and lower containing thecontents of block register 70. This value is the memory address of theend of the block of data, plus one.

Referring to FIG. 2c, an example of the operation of incrementingauxiliary register 54a using circular addressing is explained. Thecontents of the bit locations of auxiliary register 54a corresponding tothe bit locations greater than N (i.e., above the most significant "1"in block register 70) remains at all times equal to the contents of bitlocations greater than N of the base address originally stored therein.The contents of bits N and lower of auxiliary register 54a (hereinafterreferred to as the "index") are to be combined with the contents ofindex register 68a computed as described above (hereinafter referred toas the "step"). As discussed above, these bits N and lower of auxiliaryregister 54a are originally zeroes, but the explanation of the circularaddressing mode will be explained in the general case hereinbelow. ARAU52a or 52b, as the case may be, performs the combination of the indexwith index register 68a as specified by the addressing mode (i.e., indexand step added, or step subtracted from index). For purposes of thisexample, ARAU 52a will be referred to as the one of ARAUs 52a and 52bused in the circular addressing mode.

Circular addressing is accomplished by comparator 86 andadder/subtractor 90 of ARAUs 52a and 52b, illustrated in FIG. 2a.Comparator 86 provides to adder/subtractor 90 a control output (shown byline 87 of FIG. 2a) corresponding to the result of the comparison of thecontents of block register 70 and the bits of the output ofadder/subtractor 80 selected as described above (the "index") inconjunction with certain relationships among the values of the index andstep, to the contents of block register 70. A first such relationshipprovides that, if the combination of the index and the step is greaterthan or equal to zero and less than or equal to the contents of blockregister 70, then bits N and lower of the updated contents of auxiliaryregister 54a will consist of the sum (or difference, as the case may be)of the index and the step. In other words, if the conditions of thefirst relationship are met, adder/subtractor 86 will perform neither anaddition nor a subtraction, but will merely apply at its output theoutput of adder/subtractor 80. The equation for this first relationshipcan be expressed as follows:

    IF 0<=index.sub.n +/-step<=block

    THEN index.sub.n+1 =index.sub.n +/-step.

In the above relationship, "index_(n) " is the contents of bit locationsN and lower of auxiliary register 54a prior to modification,"index_(n+1) " refers to the contents of bit locations N and lower aftermodification, "step" refers to the contents of index register 68a (inthis example) and "block" refers to the contents of block register 70.

A second relationship provides that, if the combination of the index andthe step is less than zero, the modified contents of bits N and lower ofauxiliary register 54 will be the sum (or difference) of the index andstep, plus the contents of block register 70. This is accomplished inARAU 52a by the control output of comparator 86 causing adder/subtractor90 to add the contents of block register 70 to the output ofadder/subtractor 80. The results of this addition are then applied tomultiplexer 88. In equation form:

    IF 0>index.sub.n +/-step

    THEN index.sub.n+1 =(index.sub.n +/-step)+block.

Finally, in the event that the combination of bit locations N and lowerof auxiliary register 54a is greater than the contents of block register70, the contents of block register 70 will be subtracted from theaddition (subtraction) of the index and the contents of index register68a. As in the above relationship, ARAU 52a accomplishes this bycomparator 86 causing adder/subtractor 90 to subtract the contents ofblock register 70 from the output of adder/subtractor 80, and apply theresults to multiplexer 88. The equation is as follows:

    IF index.sub.n +/-step>block

    THEN index.sub.n+1 =(index.sub.n +/-step)-block.

Controller 14 selects the circular addressing mode by causingmultiplexer 88 to select the output of adder/subtractor 90 forapplication to bus 67a, illustrated in FIG. 2a.

As is evident from the above description, the circular addressingfeature not only provides automatic looping of addresses for memorylocations, but also is operable in the event that the modification ofthe memory address ventures outside the desired data block. Thisprovides for additional flexibility in the addressing of a block ofdata. For example, if the block size is odd, with an index of two thememory block would be addressed by sequencing first through the evenmemory addresses, followed by sequencing through the odd memoryaddresses. Certain digital signal processing applications areperformable with less program and data space required, and with fasterperformance, by way of such a method.

The effect of the circular addressing feature in the indirect addressingfunction is to create additional addressing modes. Table 3 lists thoseindirect addressing modes with the circular addressing feature which areincorporated in the preferred embodiment of the instant invention. Theterm "circ()" indicates the combination of the circular featuredescribed above in the operation on the contents of the selected one ofauxiliary register 54 represented by "ARn" with the displacement code orindex register 68, as the case may be, and the modified contents ofauxiliary register 54 represented by "ARn'".

                  TABLE 3                                                         ______________________________________                                        Description        Operation                                                  ______________________________________                                        Indirect w/post-displacement                                                                     add =    ARn                                               add and circular modify                                                                          ARn' =   circ(ARn + disp)                                  Indirect w/post-displacement                                                                     add =    ARn                                               subtract and circular modify                                                                     ARn' =   circ(ARn - disp)                                  Indirect w/post-index add and                                                                    add =    ARn                                               circular modify    ARn' =   circ(ARn + IRm)                                   Indirect w/post-index subtract and                                                               add =    ARn                                               circular modify    ARn' =   circ(ARn - IRm)                                   ______________________________________                                    

Referring back to FIG. 2, data bus controller 56 is connected to datalines 30d of data bus 30, and serves to control the flow of data fromdata bus 30 to the various portions of CPU 12. Internal to CPU 12 are apair of CPU buses 60a and 60b, and a pair of register buses 62a and 62b.Data bus controller 56 consists of a four-to-one multiplexer, having itsfour inputs connected to CPU buses 60a and 60b, and to register buses62a and 62b. Communication from CPU 12 to data lines 30d of data bus 30thus can occur from any one of these four internal buses at any giventime; such communication of course requires that a corresponding addresssignal be generated on address lines 30a or address lines 30b inconjunction with the data communication on data lines 30d. Since theoutputs of ARAUs 52a are connected to address lines 30a and 30b of databus 30, respectively, such addresses can be generated by CPU 12 inconjunction with the desired data communication through data buscontroller 56.

The parallel nature of ARAUs 52a and 52b allows the computation of morethan one memory address by CPU 12 within a single machine cycle.Accordingly, data bus controller 56 is capable of connecting more thanone of CPU buses 60 and register buses 62 to data lines 30d of data bus30 within a single machine cycle. Control of the application of theoutput of ARAUs 52a and 52b to the address lines 30a and 30b of data bus30, and of the time-multiplexing of data lines 30d to the internal busesof CPU 12, is done by controller 14 according to the instruction codebeing executed.

Referring now to FIG. 3, the construction of peripheral ports 24 and 26will be described in detail. Peripheral ports 24 and 26 are connected todata bus 30, program bus 34 and DMA bus 38, as was described earlierwith reference to FIG. 1. Peripheral port 24 consists primarily of amultiplexer 100, which selectively connects external data lines D_(n) todata lines 30d of data bus 30, data lines 34d of program bus 34 or datalines 38d of DMA bus 38, responsive to control signals generated onlines SEL₂₄ by controller 14. It should be noted that multiplexer 100creates a bidirectional connection between external data lines D_(n) andthe data lines 30d, 34d or 38d, so that data may be received orpresented therebetween. In addition, multiplexer 102 selectivelyconnects external address lines A_(n) to address lines 30a or 30b ofdata bus 30, address lines 34a of program bus 34, or address lines 38aof DMA bus 38, also responsive to controller 14 depending upon whichdata lines are connected by multiplexer 100 to data lines D_(n).

A number of control lines are driven by buffers 104 in peripheral port24, also responsive to signals generated by controller 14 (on lineswhich are not shown, for purposes of clarity). These control linesoutput by peripheral port 24 include line R/W₋₋, which specifies the thedirection of the flow of data through peripheral port 24. For example,an external memory device could serve as data memory, by having its datainput and output terminals connected to lines D_(n) and its addressterminals connected to lines A_(n). Peripheral port 24 of microcomputer10 could effect a memory read of such external memory by connecting thedesired address lines, e.g., address lines 30b of data bus 30, to linesA_(n) and by driving line R/W₋₋ to a high logic state, indicating thatthe external memory device is to be read at the location specified onaddress lines 30b of data bus 30. Conversely, a low logic state on lineR/W₋₋ would indicate that the external memory device is to be writtenwith the data state present on data lines 30 d, connected viamultiplexer 100 to lines D_(n).

The control lines connected to peripheral port 24 further include lineSTRB₋₋ (as in line R/W₋₋, the "₋₋ " designation indicating active low)driven by buffers 104 responsive to controller 14, which is a clocksignal indicating to external memory that the set of address lines 30a,30b, 34a or 38a connected to lines A_(n), as the case may be, arepresenting a valid address signal to address memory. Lines HOLD₋₋ andRDY₋₋ are inputs to microcomputer 10 from external devices. Line HOLD₋₋being active low causes peripheral port 24 to place its interface tolines D_(n), A_(n), R/W₋₋, and STRB₋₋ in a high-impedance state, so thata plurality of devices connected to such lines may communicate among oneanother without interference from, or interference to, microcomputer 10.Line HOLDA₋₋ is an acknowledge signal driven by controller 14 viabuffers 104 in peripheral port 24, and is has a low logic state whichindicates that microcomputer 10 has received the HOLD₋₋ signal in itslow state, and has placed peripheral port 24 in a high impedance state.Line RDY₋₋ is an input to microcomputer 10 and, when driven to its lowlogic state, indicates that an external device connected to data linesD_(n), address lines A_(n), and control lines R/W₋₋ and STRB₋₋ hascompleted a communication cycle with microcomputer 10. Controller 14requires the RDY₋₋ signal prior to causing peripheral port 24 to drivesaid lines to valid states other than that directed to the communicationcycle which had ended with the RDY₋₋ signal low.

Peripheral port 26 is similarly constructed as peripheral port 24, butis controlled by lines SEL₂₆ independently from peripheral port 24, sothat communication at both peripheral ports 24 and 26 can occursimultaneously and independently, so long as the buses 30, 34 and 38used by the two ports are not simultaneously used. Peripheral port 26 isprimarily useful in communication with external input and outputdevices. Accordingly, as shown in FIG. 3, peripheral port 26 containsmultiplexers 108 and 110, and buffers 112, corresponding to likecomponents in peripheral port 24. Similarly, peripheral port 26interfaces data bus 30, program bus 34 and DMA bus 38 to lines I/OD_(n),I/OA_(n), I/ORDY₋₋, I/OSTRB₋₋, I/OHOLD₋₋, I/OHOLDA₋₋ and I/OR/W₋₋,having the same functions as similarly designated lines at peripheralport 24. It should be noted that, because of the plurality of buses 30,34, and 38 connected to peripheral ports 24 and 26, peripheral port 24and peripheral port 26 can be operating simultaneously.

Referring now to FIG. 4, the construction and operation of controller 14will be described in detail. Controller 14 serves the purposes ofcontrolling the operation of the rest of microcomputer 10, so that thedesired operation specified by the instruction codes will be properlyexecuted.

Controller 14 receives clock signals presented from external tomicrocomputer 10. Clock generator 200 in controller 14 is connected toterminals X1 and X2 and generates the internal clock signals which areused in microcomputer 10, for example the system clock on line CLKIN. Ifa crystal is connected between terminals X1 and X2, clock generator 200will, by way of an internal oscillator, generate the system clock signalon line CLKIN. Alternatively, an externally-generated clock can beapplied to terminal X2, in which case the externally-generated clocksignal will generate (possibly via a divide-by-n in clock generator 200,not shown) the system clock signal on line CLKIN. Clock generator 200further generates clock signals Q1 and Q2, which occur on the first andthird quarter-cycles of the period of the clock signal on line CLKIN,however generated; clock signals Q1 and Q2 are used by memory accessarbitration logic 206 in controller 14, as described below.

Relative to the fetching of instruction codes and the control ofmicrocomputer 10 responsive to such instruction codes, controller 14contains program counter 92, instruction register 94, control logic 202,and program counter control logic 204. Program counter 92 is atwenty-four bit register, having an output connected to address lines34a of program bus 34. The function of program counter 92 is to storethe memory address of the next instruction to be fetched, decoded, andexecuted by microcomputer 10. In an instruction fetch cycle (whichoccurs during one period of the system clock signal on line CLKIN), thecontents of program counter 92 are placed upon address lines 34a ofprogram bus 34 and the one of memories 16, 18 or 20 (or external memory)containing the memory location corresponding to the address signal willpresent the addressed contents onto data lines 34d of program bus 34;the contents of the memory location having the address contained inprogram counter 92 constitute the instruction code of the nextinstruction to be decoded. Instruction register 94 is a thirty-two bitregister which is connected to data lines 34d of program bus 34, andwhich receives the contents of the contents of program counter 92 duringthe fetch cycle.

During the decode cycle, occurring in the next period of the systemclock signal on line CLKIN after the fetch cycle, the contents ofinstruction register 94 are decoded by control logic 202, to generatecontrol signals going from controller 14 to the functional circuits ofmicrocomputer 10. To accomplish this, a first portion of control logic202 contains combinatorial logic for decoding the instruction code. Suchcombinatorial logic (shown as logic 202a in FIG. 4) can be realized indifferent well-known ways, such as a programmable logic array or aread-only memory. The thirty-two bit instruction code from instructionregister 94 is thus decoded by combinatorial logic 202a into multipleoutput lines. Some of these lines are directly connected to functionsoutside of control logic 202, such as to program counter control logic204; other of these lines are input into sequential logic 202b withincontrol logic 202. Sequential logic 202b is operative to control thevarious functions of microcomputer 10 so as to allow the reading of dataoperands from memory by CPU 12, and so as to control the execution ofthe data processing operations on said operands by CPU 12. Sequentiallogic 202b accomplishes this, of course, by way of additional outputlines emanating therefrom. The logic states of the output lines fromcontrol logic 202, whether from combinatorial logic 202a or sequentiallogic 202b, are thus determined by the instruction code received bycontrol logic 202 from instruction register 94. It should be noted thatthe drawing figures referred to herein do not show the connection ofthese control lines between controller 14 and such functional circuitryfor purposes of clarity.

It is therefore apparent that combinatorial logic 202a in control logic202 can be decoding an instruction code which was stored in instructionregister 94 while controller 14 is causing the fetch of the followinginstruction from memory. In addition, as is well known in the art,sequential logic 202b is operative to control the operand read for agiven instruction simultaneously with the control of the execution of apreviously fetched instruction. Accordingly, control logic 202 can becontrolling microcomputer 10 in such a manner that portions of fourdifferent instruction codes may be carried out simultaneously. Such"pipelining" of the instruction codes will obviously reduce the timerequired to perform a given sequence of instructions.

FIG. 4a illustrates an example of how the pipeline is filled, andaccordingly how the pipeline operates for a typical instruction. In thefirst cycle of the system clock signal on line CLKIN, instruction n isbeing fetched by controller 14, for example from one of memories 16, 18or 20. During the fetch cycle, however, program counter control logic204 has incremented the contents of program counter 92 to contain thememory location of the instruction code for instruction n+1. During thesecond cycle of the system clock signal on line CLKIN, the instructioncode for instruction n is being decoded by control logic 202. Alsoduring this second cycle, the contents of program counter 92 arepresented to address lines 34a of program bus 34, and the instructioncode for instruction n+1 are fetched from program memory and loaded intoinstruction register 94.

During the third system clock cycle shown in FIG. 4a, sequential logic202b is effecting a read from memory (e.g., RAM 16) of a data operandnecessary for instruction n via data bus 30. In addition, since theinstruction code for instruction n+1 has been fetched, the third cycleshown in FIG. 4a illustrates that instruction n+1 is being decoded bycombinatorial logic 202a of control logic 202. Simultaneously with theread cycle for instruction n, however, the fetch of the instruction codefor instruction n+2 is being done, assuming there is no bus or memoryconflict with the read cycle for instruction n. As described above,generally the data operand is read by CPU 12 via data bus 30 while theinstruction code is read via program bus 34; assuming that both residein different memories 16, 18 or 20, or one residing in external memory,no bus conflict will occur.

During the fourth cycle of the system clock, instruction n will beexecuted under the control of sequential logic 202b in control logic202, the read operation for instruction n+1 will be effected bysequential logic 202b, the instruction code for instruction n+2 will bedecoded, and the instruction code for instruction n+3 will be fetched.Accordingly, the pipeline for microcomputer 10 will be filled, and theperformance of a sequence of instructions will be optimal, subject tobus conflicts and to memory access conflicts which may, for certaininstruction combinations, cause a wait cycle for one of the operations.

Data lines 30d of data bus 30 are received by controller 14, for controlof the program flow in other than incremental fashion, such as a branchinstruction, requiring that program counter 92 be loaded by CPU 12 orfrom memory. For example, in the event of an unconditional branch, thevalue of an operand contained in the instruction code, read from memory,or read from a register in CPU 12 may contain the address of the memorylocation containing the next instruction code to be executed. Programcounter control logic 204 will then receive the value presented upondata lines 30d, and load program counter 92 accordingly, so that programcontrol can pass to the desired location.

As illustrated in FIG. 4, program counter control logic 204 contains anadder 203 which receives the contents of program counter 92. Controllogic 202 (preferably combinatorial logic 202a therein), controls adder203 so that generation of the contents of program counter 92 for thenext cycle may be performed in a variety of manners. As explained above,adder 203 may merely increment the prior contents of program counter 92,to step through the instruction sequence. However, program countercontrol logic 204 further contains an register 205, which can receive avalue from data lines 30d of data bus 30. Program counter control logic204 can thus calculate the contents of program counter 92 in variousways. For example, branching to a relative address (relative to programcounter 92) may occur by way of loading register 205 with a valuepresented on data lines 30d of data bus 30; this value could then beadded to the prior contents of program counter 92 to generate a newvalue for program counter 92. In addition, an absolute branch may beeffected by loading register 205 with the desired memory address fromdata lines 30 d of data bus 30, and by control logic 202 causing adder203 to perform a "zero-add" with the contents of register 205 forapplication to program counter.

It should be further noted that microcomputer 10 is capable ofperforming a "delayed" branch instruction, so that the branchinstruction is fetched three instructions before it is actually tooccur. The delayed branch instruction, when executed, loads register 205with the destination memory address of the branch as in a direct branch.However, control logic 202 will continue to increment the contents ofprogram counter 92 for the next three instructions following theexecution of delayed branch instruction. Upon the third instruction,adder 203 will apply the contents of register 205 to program counter 92,thereby effecting the branch while continuing to take advantage of thepipeline scheme. The pipeline may, of course, remain full after thebranch, as the destination location may continue to be incremented asbefore by adder 203.

Controller 14 further includes interrupt logic 250, which is connectedto a plurality of external terminals of microcomputer 10, to controller14, and to various of the functions within microcomputer 10. Interruptlogic 250 serves the purpose of receiving interrupt signals presented tomicrocomputer 10 on the RESET terminal and on terminals INTO throughINT3, and receiving interrupt signals generated internally tomicrocomputer 10 from various functions such as serial port 42 and DMAcontroller 22. An example of such an internal interrupt signal is shownin FIG. 4 by line 312, which is an interrupt signal from DMA controller22. Contained within CPU 12 as a control register is interrupt enableregister 252, which is a memory-mapped addressable register, thecontents of which specify whether each of the interrupt signals isenabled or disabled. Responsive to the receipt of an enabled interruptsignal, either from terminals INTO through INT3 or from internal tomicrocomputer 10, and if controller 14 indicates that an access to aninput/output memory location is not current, interrupt logic 250 willcause program counter 92 to be loaded with a memory addresscorresponding to the particular interrupt signal (the "interruptvector"), and the execution of the program will continue from theinterrupt vector location forward. Responsive to an instruction codegenerally included in the interrupt handling routine called by theinterrupt vector, interrupt logic 250 will generate interruptacknowledge signals on line INTA for external interrupts and, forexample, on line 314 for the internal interrupt signal for DMAcontroller 22. As is well known in the art for such an operation,controller 14 will cause the prior contents of program counter 92 to bestored in a predetermined memory location (generally called a "stack"),so that the location of the instruction code which would have beenfetched next will be reloaded after the interrupt has been serviced.

It is apparent from FIGS. 1 and 2 that the plurality of buses internalto microcomputer 10 can allow the simultaneous access of memories 16, 18and 20, so long as no two of the buses 30, 34, or 38 are simultaneouslyaccessing the same memory 16, 18 or 20 or simultaneously accessingexternal memory (via peripheral port 24 or 26). If this is the case, nobus arbitration is required to be enacted by controller 14, and thememory accesses can take place independently.

However, such simultaneous access may be requested, depending upon theinstruction codes being executed. Accordingly, to prevent bus conflictsrelative to memory access, controller 14 further includes memoryarbitration logic 206. Memory arbitration logic 206 receives clocksignals Q1 and Q2 from clock generator 200 and receives the addresssignals on each of the address lines of buses 30, 34 and 38. Memoryarbitration logic 206 provides output signals on lines SEL₁₆, SEL₁₈,SEL₂₀ to each of memories 16, 18, and 20, respectively; memoryarbitration logic 206 further generates the signals on lines SEL₂₄ andSEL₂₆ to peripheral ports 24 and 26, respectively. The purpose of memoryarbitration logic 206 is to control the access to memories 16, 18 and20, and external and input/output memories, according to a predeterminedpriority.

For purpose of the following examples, the priority will be presumed tobe in the order of address lines 30a and 30b of data bus 30 having thehighest priority, followed by address lines 34a of program bus 34, andfollowed by address lines 38a of DMA bus 38 with the lowest priority.This priority is chosen because of the construction of microcomputer 10,specifically CPU 12; the parallel connection of multiplier 46 and ALU 48means that, for the digital signal processing applications intended formicrocomputer 10, it is most likely that performance would be moresignificantly impacted if data communications were forced to waitbecause of instruction fetches, than vice versa. DMA operations can takelowest priority because of the minimal overall performance impact formost application programs resulting from slower DMA relative to theother operations. It should be noted, however, that other applicationsof the instant invention would be more favorably performed if thepriority were altered. For example, for graphics applications, DMA maybest be prioritized at the highest level if used to provide the videodisplay refresh function. Accordingly, the priority illustrated hereinis by way of example only.

Referring now to FIG. 5, the control of one of memory ports 32a bymemory arbitration logic 206 within controller 14 illustrated. Asdescribed above relative to FIG. 1, each of memory ports 32a isconnected to receive address signals from sets of address lines 30a and30b of data bus 30, from address lines 34a of program bus 34, and fromaddress lines 38a of DMA bus 38. Memory port 32a, as illustrated in FIG.5, performs primarily a multiplexer function, as it receives saidaddress lines at its inputs and connects the selected one of the addressline sets to the decoder 33 of its associated memory 16, 18 or 20,responsive to signals from controller 14.

FIG. 5 is a logical schematic of a portion of memory arbitration logic206 within controller 14 which controls one pair of ports 32a and 32d;by way of example, ports 32a and 32d shown in FIG. 5 are associated withRAM 16. As described above, a single memory address space is utilized bymicrocomputer 10 for all of the memories 16, 18 and 20 withinmicrocomputer 10, and including the addresses of memory external tomicrocomputer 10 and accessible via peripheral ports 24 and 26. Itshould be recalled that the memory address space of microcomputer 10 is16 Mwords (2²⁴ words, due to the twenty-four bits carried on each set ofaddress lines in buses 30, 34 and 38). Using this single memory space,Table 4 shows the memory map of microcomputer 10 according to thepreferred embodiment of the instant invention.

                  TABLE 4                                                         ______________________________________                                        Address range (hexadecimal)                                                                       Location/function                                         ______________________________________                                        000000 through 00003F                                                                             Interrupt handling                                        000040 through 000FFF                                                                             ROM 20                                                    001000 through 7FFFFF                                                                             External memory                                           800000 through 800FFF                                                                             I/O & other memory                                                            mapped registers                                          801000 through 8013FF                                                                             RAM 16                                                    801400 through 8017FF                                                                             RAM 18                                                    801800 through FFFFFF                                                                             External memory                                           ______________________________________                                    

As stated above, the memory address space which refers to I/O and memorymapped registers is directed to peripheral port 26 (including, as willbe discussed below, registers addressable by way of peripheral bus 28,including those in DMA controller 22, timer 40, serial port 42 andformat converter 44), while the external memory access is generallyhandled via peripheral port 24.

Within memory arbitration logic 206 are decoders 120a through 120dwhich, for its associated one of the sets of address lines 30a, 30b, 34aand 38a, decodes sufficient ones of address lines therein to determineif the address value specified on the associated address lines has avalue in the range for the given one of memories 16, 18 and 20controlled thereby. For purposes of an example, assume that the one ofports 32a shown in FIG. 5 is associated with RAM 16; accordingly, port32a of FIG. 5 should be responsive to an address value on one of thesets of address lines 30a, 30b, 34a or 38a which is between 801000_(h)and 8013FF_(h). It should be noted, of course, that one of ordinaryskill in the art could design decoders 120a through 120d in such amanner as to take advantage of the "don't care" values of the leastsignificant ten bits of the address lines. The output of each ofdecoders 120 is a logic "1" in the illustrated example of FIG. 5 in theevent that the address lines connected thereto is within the range801000_(h) and 8013FF_(h). The output lines from decoders 120a through120d are M30A, M30B, M34A and M38A respectively, designating thepresence or absence of a match between the address and the memoryaddress space associated with RAM 16.

As described above, clock generator 200 of controller 14 generates twoclock signals Q1 and Q2 which are utilized in the control of ports 32a.As discussed above, the system clock for microcomputer 10 corresponds tothe clock signals on line CLKIN. Clock signals Q1 and Q2 are eachassociated with a phase of the system clock on line CLKIN. Clock signalQ1 is a "1" during the first quarter-cycle of the system clock, andclock signal Q2 is a "1" during the third quarter-cycle of the systemclock. Memory arbitration logic 206 shown in FIG. 5 uses these two clocksignals Q1 and Q2 in order to time-multiplex the address signals on setsof address lines 30a and 30b with one another. Signal M30A shown in FIG.5 is connected to a first input of AND gate 122a, while clock signal Q1is connected to the second input of AND gate 122a. The output of ANDgate 122a is therefore a "1" only when the address presented on addresslines 30a of data bus 30 is within the memory space of RAM 16 (in theillustrated example) during the first quarter-cycle of the system clock.The output of AND gate 122a is connected to port 32a, and is designatedSEL30A; port 32a is operable to select address lines 30a of data bus 30for application to decoder 33 of RAM 16 responsive to line SEL30A in its"1" logic state. Conversely, line SEL30B is connected to the output ofAND gate 122b, which performs the logical AND of the output of decoder120b and clock signal Q2. Port 32a therefore only selects address lines30 b for application to decoder 33 of RAM 16 when the value on addresslines 30b is between 801000_(h) and 8013FF_(h) during the thirdquarter-cycle of the system clock. It is therefore apparent from thisdescription and from FIG. 5 that sets of address lines 30a and 30b ofdata bus 30 can never create a conflict for being directed to the samememory 16, 18 or 20 (or external) during a given cycle because of thetime-multiplexing of the two addresses within a cycle performed bycontroller 14 as shown in FIG. 5. It should also be apparent that theaddresses on sets of address lines 30a and 30b are at the highestpriority, relative to the address lines in program bus 34 and DMA bus38, since the value of the address values on buses 34 and 38 are notconsidered in the generation of the "1" logic state on lines SEL30A andSEL30B by controller 14.

Such priority control is enabled by controller 14 relative to addresslines 34a of program bus 34, and address lines 38a of DMA bus 38.Decoder 122c which receives address lines 34a of program bus 34 at itsinput, and generates a "1" logic state on line M34A responsive to theaddress value being between 801000_(h) and 8013FF_(h), similarly asdecoders 122a and 122b. Line M34A is connected to one input of each ofAND gates 124a and 124b, which generates a signal at its outputcorresponding to the logical AND of its three inputs. A second input ofAND gate 124a is connected to clock signal Q1, and a third, inverted,input of AND gate 124a is connected to line M30A; accordingly, theoutput of AND gate 124a is at a "1" logic state corresponding to theaddress value on address lines 34a corresponding to a memory location inRAM 16 (in this example) during the first quarter-cycle of the systemclock, if and only if the address value of address lines 30a of data bus30 does not so correspond to a RAM 16 memory location. This "1" logicstate is applied to port 32a on line SEL34, indicating that addresslines 34a of program bus 34 is to be selected for application to RAM 16,via OR gate 126. The application of address lines 34a to RAM 16 by port32a is similarly enabled by AND gate 124b, so long as line M30B is low(i.e., the address on address lines 30b corresponds to a memory locationoutside of the memory space for RAM 16).

The selection of address lines 38a of DMA bus 38 by port 32a is enabledby a "1" logic state on line SEL38. Similarly as the "1" logic state online SEL34, the "1" logic state on line SEL38 is generated by way ofdecoder 120d (having line M38A at its output which has a "1" logic statewhen the address value of lines 38a are within the address space of RAM16), AND gates 128a and 128b, and OR gate 130. AND gates 128a and 128beach have a fourth, inverted, input, however, which is connected to lineM34A from the output of decoder 120c. Accordingly, the selection ofaddress lines 38a of DMA bus 38 is at even a lower priority than addresslines 34a of program bus 34, since in order to generate a "1" state online SEL38, since both the address value on address lines 30a (or 30b,depending upon which quarter-cycle is current) of data bus and theaddress value on address lines 34a must not correspond to a memorylocation within RAM 16 (in this example).

As shown in FIG. 5, port 32d is similarly enabled by lines SEL₁₆ (i.e.,lines SEL30A, SEL30B, SEL34, and SEL38) to select the proper data linesof data bus 30, 34 or 38 for connection to the corresponding memory (inthis example, RAM 16). Since data lines 30d are accessed by both addresslines 30a and address lines 30b of data bus 30, lines SEL30A and SEL30Bare ORed for purposes of the selection of data lines 30d of data bus 30.It should also be noted that ports 32a and 32d are each tri-stated inthe event that none of the address lines 30a, 30b, 34a or 38a are withinthe address space of the corresponding memory. This precludes theassociated memory from interfering with data lines 30d, 34d, or 38d whennot selected.

As shown above in FIGS. 1 and 4, memory arbitration logic 206 incontroller 14 generates select outputs via lines SEL₁₈ and SEL₂₀ toports 32a and 32d of memories 18 and 20, respectively. In addition,memory arbitration logic 206 provides select outputs via lines SEL₂₄ andSEL₂₆ to peripheral ports 24 and 26 in a fashion similar as thatdescribed hereinabove relative to FIG. 5. Within peripheral ports 24 and26, multiplexers 100, 102, 106 and and 108 of FIG. 3 are enabled basedon the same priority scheme, depending upon the address values on saidaddress lines 30a, 30b, 34a and 38a.

Control of read and write operations for the various memory devices isaccomplished by way of certain of the control outputs from sequentiallogic 202b in control logic 202 of controller 14, shown in FIG. 4. Thisfunction, as the other control functions performed by controller 14,occurs responsive to the instruction codes received and decoded bycontroller 14.

Referring now to FIG. 5a, the timing and prioritization of a series ofmemory accesses is shown in order to illustrate the parallel and dualaccess features of the instant invention. The top line of FIG. 5aillustrates the operation of the system clock signal on line CLKIN, withthe cycles numbered for ease of correlation with the descriptionhereinbelow. Clock signals Q1 and Q2 are illustrated as describedhereinabove, with clock signal Q1 active during the first quarter-cycleof the system clock period, and with clock signal Q2 active during thethird quarter-cycle of the system clock period. For purposes of clarity,the examples illustrated in FIG. 5a are all read accesses to the variousmemories. It should be noted that write accesses to RAMs 16 and 18, andto external memory, are prioritized and granted in the same way as theread accesses shown in FIG. 5a, only with the memories responsive towriting in the value of the associated data lines.

During the first cycle of system clock CLKIN shown in FIG. 5a, addresslines 30a are carrying an address value i₁, which corresponds to amemory location in RAM 16; similarly, address lines 30b are carrying anaddress value j₁, which corresponds to an address value in ROM 20.Responsive to clock signal Q1 active, RAM 16 presents the contents ofmemory location i₁ on data lines 30d of data bus 30. Responsive to clocksignal Q2 active in the third quarter-cycle of system clock CLKIN, ROM20 presents the contents of memory location j₁ on data lines 30d of databus 30. Of course, since address lines 30a and 30b are referring todifferent memories, no conflict arises therebetween.

Also during the first cycle of system clock CLKIN shown in FIG. 5a,address lines 34a of program bus 34 are carrying an address value k₁which also corresponds to a memory location in ROM 20. Since addresslines 30b of data bus 30 have priority over address lines 34a of programbus 34, ROM 20 is not responsive to address lines 34a since addresslines 30b are granted access to ROM 20. Accordingly, data lines 34d ofprogram bus 34 remain in a high-impedance state, since no other memoryis accessed by address value k₁, and since RAM 20 is accessed instead byaddress lines 30a and 30b. Similarly during the first cycle, addresslines 38a of DMA bus 38 are carrying address value l₁ which correspondsto a memory location in RAM 16; since address lines 38a have a lowerpriority than address lines 30a of data bus 30, data lines 38d of DMAbus 38 are also in a high-impedance state. Since a conflict in theattempted access of a single memory device by two of buses 30, 34 and 38has occurred, controller 14 will cause, via control logic 202, thedesired memory address of the lower priority bus to continue to bepresented, so that as soon as access to the memory can be granted, theexecution of the program will begin again from the same point for theone of buses 34 or 38 denied access.

In the second cycle shown in FIG. 5a, address lines 30a and 30b presentaddress values i₂ and j₂, respectively, to RAM 18; accordingly, datalines 30d are presented with the contents of memory locations i₂ and j₂responsive to clock signals Q1 and Q2, as in the first cycle. Noconflict occurs because of address lines 30a and 30b both referring toRAM 16, since the separate sets of address lines 30a and 30b arecontrolled, by operation of controller 14 as described relative to FIG.5, to be presented to RAM 16 at separate times within the system clockperiod. Address lines 34a of program bus 34 continue to carry addressvalue k₁ which corresponds to a memory location in ROM 20; since addresslines 30a and 30b are accessing RAM 16, program bus 34 is then grantedaccess to ROM 20, and responsive to clock signal Q1, the contents ofmemory location k₁ in ROM 20 are presented on data lines 34d of programbus 34. Also during the second cycle shown in FIG. 5a, address lines 38aof DMA bus 38 continue to carry address value l₁ corresponding to amemory location in RAM 16; since neither data bus 30 nor program bus 34has been granted access to RAM 16, RAM 16 presents the contents ofmemory location 1 on data lines 38d of DMA bus 38, responsive to clocksignal Q1. It is therefore apparent that microcomputer 10, constructedaccording to the instant invention, is capable of having three parallelaccesses to three different memory locations occurring simultaneously.Taking into consideration the intra-cycle multiplexing of sets ofaddress lines 30a and 30b of data bus 30, the capability of four memoryaccesses within a single system clock cycle may be performed.

The third cycle of system clock CLKIN illustrated in FIG. 5a shows theeffect of address lines 30a of data bus 30 taking priority over addresslines 38a of DMA bus 38. As clock signal Q1 goes active, both addresslines 30a and address lines 38a are carrying address values within theaddress space of RAM 18 (values i₃ and l₂, respectively). Accordingly,data bus 30 is granted access to RAM 18 over DMA bus 38; data lines 30dof data bus thus are presented with the contents of memory location i₃,while data lines 38d of DMA bus 38 go to a high-impedance state.However, upon clock signal Q2 going active, address lines 38a of DMA busare granted access to RAM 18, since address lines 30a of data bus 30 aregranted access only responsive to clock signal Q1. Since address lines30b are carrying address value j₃ corresponding to a memory location inRAM 16, address lines 38a access RAM 18, so that data lines 38 d arepresented with the contents of memory location l₂ of RAM 18 responsiveto clock signal Q2.

In the fourth cycle shown in FIG. 5a, address lines 34a are carryingaddress value k₃, which correspond to a memory location in RAM 18;similarly, address lines 38a are carrying address value l₃, alsocorresponding to a memory location in RAM 18. As described above,program bus 34 is granted priority over DMA bus 38. Accordingly,responsive to clock signal Q1, data lines 34d of program bus 34 arepresented with the contents of memory location k₃ of RAM 18, while datalines 38d of DMA bus 38 are in their high-impedance state. The fifthcycle shown in FIG. 5a illustrates that external memory can be accessedby address lines 34a, carrying an address value k₄ corresponding to amemory location in external memory; DMA bus 38 and data bus 30 areactive simultaneously with the access of external memory by program bus.As described above, the external memory access will occur by way ofperipheral port 24; as will be described below, during a DMA operation,peripheral port 26 will be disabled.

In addition, it should be noted that the source of the address and datainformation, and the destination of the data, sought by said buses 30,34 and 38 is not specified in the above description relative to FIGS. 5and 5a. As described above, however, one of the primary functions ofcontroller 14 in its decoding and execution of instruction codes is tocontrol the various functional blocks of microcomputer 10 so that no twofunctional blocks (e.g., peripheral port 24 and CPU 12) attempt to takecontrol of the same bus (e.g., data bus 30). Such bus control andarbitration at the end of the bus away from the memories 16, 18 and 20(or external memory) is performed by controller 14 in a manner which iswell known in the art, and which is performed in many general andspecial purpose microprocessors and microcomputers currently available.

It is therefore apparent from the description hereinabove that variouscombinations of memory utilization may be effected within the singleaddress space of microcomputer 10. This is made possible by the theaccessibility of each of the various memory entities (i.e., RAM 16, RAM18, ROM 20 and external memory) by each of the three buses 30, 34 and38. Accordingly, while controller 14 addresses and receives theinstruction codes by way of program bus 34, such addresses may reside inRAM 16 along with the data memory accessible by CPU 12 using data bus30. This organization therefore makes possible a von Neumann applicationfor microcomputer 10, by using a single memory (e.g., RAM 16) as bothprogram and data memory, with no partitioning required within RAM 16 toeffect this operation. However, microcomputer 10 can also be utilized ina Harvard configuration by storing program memory in ROM 20, forexample, and by storing data memory in RAM 16. Controller 14 can thenaccess ROM 20 for instruction codes concurrently with CPU 12 accessingRAM 16 for data operands, thereby achieving the performance improvementof a Harvard machine, in return for partitioning memory accordingly. Inaddition, some benefits of both a von Neumann and a Harvardconfiguration can be achieved by using a single memory such as RAM 16,because of the dual access feature of microcomputer 10. The dual accessfeature allows two accesses in a single system clock cycle, even to thesame memory, because of the time-multiplexed feature used by data bus30. This allows the same physical memory space to be used for both dataand program memory, while still achieving the performance advantage oftwo separate memories. It should also be apparent that, besides beingconfigurable into the two configurations, microcomputer 10 can be soreconfigured dynamically, so that certain tasks may be performed in avon Neumann manner and certain other tasks in a Harvard manner.Accordingly, microcomputer 10 constructed according to the instantinvention allows the user to optimize microcomputer 10 based upon thedesired application.

Referring now to FIGS. 6a through 6d, the operation of CPU 12 in theexecution of an instruction will be explained in detail. The exemplaryinstruction described herein is a parallel multiply and add, as such aninstruction is illustrative of an instruction which is repetitively usedin digital signal processing applications and for which microcomputer 10is specially designed to perform. In addition, the parallel multiply andadd instruction is illustrative of the primary features of CPU 12 in thepreferred embodiment of microcomputer 10, constructed according to theinvention. For purposes of the example described herein, it will beassumed that the instruction code resides in ROM 20, and that the dataoperands reside in RAM 16; as discussed above, of course, microcomputer10 is constructed so that both the instruction codes and data operandsreside in the same memory block, or in any other configuration. Themultiply of the instruction explained herein will multiply the contentsof a memory location addressed by auxiliary register 54a using theindirect post-displacement add and modify addressing mode (see Table 1),with the contents of a memory location addressed by auxiliary register54h using the indirect post-displacement subtract and modify mode, andwill store the results in data register 50a; the displacement used has avalue of one. This multiplication is in parallel with the addition ofthe contents of data register 50a with the contents of data register50e, and the storing of the sum in data register 50e.

FIG. 6a illustrates the operation of CPU 12, controller 14, ROM 20 andRAM 16 and interconnecting buses 30 and 34, during the fetch cycle ofthe instruction code for the above-described parallel multiply and addoperation. The bold arrows in FIG. 6a indicate the paths along whichsignals active in the illustrated operation are traveling. As shown inFIG. 6a, the contents of program counter 92 in controller 14 arepresented onto address lines 34a of program bus 34; presuming noconflict arises by way of data bus 30 accessing ROM 20, the contents ofthe memory location in ROM 20 corresponding to the contents of programcounter 92 are presented onto data lines 34d of program bus 34, andstored in instruction register 94.

FIG. 6b illustrates the operation of microcomputer 10 during thedecoding cycle of the parallel multiply-and-add. During this cycle,controller 14 enables the generation of the memory addresses for theoperands of the multiplication. Accordingly, the contents of auxiliaryregister 54a are presented to auxiliary register bus 65a while thecontents of auxiliary register 54h are presented to auxiliary registerbus 65b. Controller 14 is at this time also presenting a "1" as adisplacement to both ARAUs 52a and 52b.

Referring to FIG. 6c, the results of the operation by ARAUs 52a and 52b,and the performance of the read cycle, are illustrated. ARAU 52a addsthe displacement to the contents of auxiliary register 54a, and presentsthe sum to address lines 30a of data bus 30, and restores theincremented value to auxiliary register 54a via bus 67a. Similarly, ARAU52b substracts the displacement from the contents of auxiliary register54h, presents the difference to address lines 30b of data bus 30, andrestores the decremented value of auxiliary register 54h via bus 67b. Asdescribed above, data bus 30 has the highest priority in microcomputer10 for access of memories. During this cycle, the memory addressesgenerated by ARAUs 52a and 52b are presented to RAM 16 during the firstand third quarter-cycles of the system clock period. Accordingly, thecontents of the corresponding memory locationa appear on data lines 30din time-multiplexed fashion as is described relative to FIGS. 5 and 5a.

At the end of the read cycle, the multiplicands read from RAM 16 arelatched and retained by data bus controller 56. Referring now to FIG.6d, data bus controller 56 connects the latched values received on lines30d of data bus 30 during the read cycle to CPU bus 60a and to CPU bus60b, corresponding to the addresses generated by ARAUs 52a and 52b,respectively. As a result, during the execution cycle CPU bus 60a willpresent to multiplier 46 the contents of the memory location generatedby ARAU 52a, and CPU bus 60b will present to multiplier 46 the contentsof the memory location generated by ARAU 52b. Multiplexers 64a and 64bare enabled accordingly by controller 14, responsive to the instructioncode decoded in the decode cycle.

FIG. 6d illustrates the execution cycle for the parallel multiply andadd cycle described herein. The contents of data registers 50a and 50eare presented to ALU 48 via register buses 62a and 62b, respectively;register buses 62a and 62b are connected to the inputs of ALU 48 bymultiplexers 64c and 64d, respectively, by controller 14. Upon receivingthese inputs during the execution cycle, ALU 48 performs the addition ofthe two values, and stores the sum in data register 50e. Also during theexecution cycle of the instruction, multiplier 46 multiplies the valuespresented by CPU buses 60a and 60b, and stores the result in dataregister 50a. The parallel multiply-and-add instruction is thus completeat the end of the execution cycle.

This parallel multiply-and-add instruction is itself a "pipelined"technique useful in repetitive multiply and accumulate operationsnecessary in digital signal processing applications. In this instructiondata register 50a is serving as an intermediate accumulator and dataregister 50e is serving as the accumulator for the final results. Thisis apparent from the addition occurring in parallel with themultiplication; since the multiplication is not yet occurred, the valuein data register 50a used in the addition by ALU 48 is the result of theprior multiplication. The result of the multiplication by multipler 46is stored in data register 50a, and is added to the accumulated resultin data register 50e during the execution cycle of the next parallelmultiply-and-add instruction (or, of course, during a standard addinstruction). Accordingly, performance by microcomputer 10 of n repeatedparallel multiply-and-add instructions requires approximately n fewercycles of the system clock period than if the accumulation of themultiplication product did not occur in parallel with themultiplication. Accordingly, the construction of CPU 12 allows forsubstantial improvement in digital signal processing performance,especially when utilized in conjunction with the instruction pipeliningfeature described above relative to controller 14.

As discussed above, external memory devices connected to peripheral port24, for example, can be used to store the instruction codes for theprogram being executed by microcomputer 10. However, the access time ofthe external memory may be sufficiently slower than that of memories 16,18 and 20 so that controller 14 would have to wait full system clockperiod after presenting the contents of program counter 92 on addresslines 34a of program bus 34, before the instruction code would bepresented by the external memory onto data lines 34d of program bus 34for receipt by instruction register 94. It is well known that, for anygiven instruction being executed, often the next instruction code to beexecuted is located in a memory location in program memory which has anaddress close to the address of the given instruction. Such proximity inprogram memory of the next instruction code occurs especially often indigital signal processing applications, because of the repetitive natureof the calculations therein. This can be taken advantage of by use of aninstruction cache such as instruction cache 36 described herein withreference to FIG. 7.

Instruction cache 36, as described above relative to FIG. 1, isconnected to address lines 34a and data lines 34d of program bus 34. Asshown in FIG. 7, instruction cache 36 contains 64-word memory 140 whichis organized into two 32-word segments 140a and 140b. Instruction cache36 further contains segment start registers 144a and 144b, each of whichstores a predetermined number of the most significant bits of theaddresses for the instruction codes stored in the respective segments140a and 140b. In the preferred embodiment of the invention, since theaddress signal is twenty-four bits wide, and because each of segments140a and 140b contain thirty-two (2⁵) bits, the number of bits stored bysegment start registers 144a and 144b is nineteen. Associated with eachof the thirty-two words stored in each of segments 140a and 140b is aflag bit 142 for indicating the presence of the instruction code withinthe corresponding word when set, and for indicating the absence of aninstruction code therewithin when not set. MSB comparator 146 isconnected to address lines 34a, for comparing the nineteen mostsignificant bits on address lines 34a with the contents of the segmentregisters 144a and 144b. LSB decoder 148 is also connected to addresslines 34a and, as will be discussed below, is for decoding the fiveleast significant bits of the address lines 34a. Input/output buffer 150is connected between data lines 34d and segments 140a and 140b, forcontrolling the output of instruction cache 36 to program bus 34.Instruction cache 36 further contains least-recently-used (LRU) stack152 which points to segment registers 144a and 144b corresponding to theorder in which they were most recently used.

In operation during a fetch cycle, where the memory address of theinstruction code to be fetched does not reside in RAMs 16 or 18, or inROM 20, but in external memory, MSB comparator 146 receives the nineteenmost significant bits of the address signal on address lines 34a ofprogram bus 34, and compares them to the contents of segment registers144a and 144b. In the event that a match is found, LSB decoder 148 thendecodes the five least significant bits of the address signal on addresslines 34a, to select the one of flag bits 142 corresponding to the oneof thirty-two words within either segment 140a or 140b of the fulladdress signal on address lines 34a. If the corresponding flag bit 142is set, input/output buffer 150 will present the contents of thecorresponding word within the matched segment 140a or 140b onto datalines 34d of program bus 34, and the access of the instruction codestored in instruction cache 36 is completed. In addition, the segmentregister 144a or 144b which was matched is pointed to by the top of LRUstack 152, and the non-matching segment register 144a or 144b is pointedto by the bottom of LRU stack 152. The segment pointed to by the bottomof LRU stack 152 is the least recently used one of segments 140a and140b, and will be the segment which is replaced in the event of a cache"miss", as will be explained below.

In some applications, some of the words in segments 140a and 140b maynot be loaded with instruction codes. Therefore, the possibility arisesthat the nineteen most significant bits on address lines 34a of programbus 34 will match the contents of one of segment registers 144a and144b, but the word within the matching one of segments 140a or 140bcorresponding to the five least significant bits will not contain aninstruction code. In this event, the flag bit 142 for the correspondingword is not set (i.e., contains a "0" logic state). This is of course acache "miss", and the instruction code for the corresponding addressmust be read from the addressed memory location in external memory;input/output buffer 150 will load the instruction code from data lines34d of program bus 34 into the corresponding word within the matchedsegment 140a or 140b, with the corresponding flag bit 142 being set to a"1" logic state. However, since the most significant bits matched one ofsegment registers 144a and 144b, the matching one of segment registers144a or 144b will be pointed to by the top of LRU stack 152, and theother one of segment registers 144a and 144b will be pointed to by thebottom of LRU stack 152.

In the event that the nineteen most significant bits on address lines34a of program bus 34 match the contents of neither one of segmentregisters 144a or 144b, a cache "miss" also occurs. In this event, flagbits 142 will be reset for all words in the one of segments 140a or 140bwhich corresponds to the least recently used one of segments 140a and140b , which is pointed to by the bottom of LRU stack 152. The nineteenmost significant bits on address lines 34a will then be stored into thesegment register 144a or 144b for the least recently used one ofsegments 140a or 140b, and the instruction code received from externalmemory on data lines 34d will be loaded into the corresponding one ofthe thirty two words in the "new" segment corresponding to the fiveleast significant bits on address lines 34a, and its flag bit 142 willbe set to a "1" state. The one of segment registers 140a or 140bcontaining the newly loaded instruction code will be pointed to by thetop of LRU stack 152, with the other segment register 140a or 140bpointed to by the bottom of LRU stack 152.

Status register 71 is contained in CPU 12, as shown in FIG. 2. Threebits are contained within status register 71 which control the operationof instruction cache in a manner apart from that described above. Afirst bit is the cache clear bit which, when set, resets all of flagbits 142, in effecting clearing the contents of instruction cache 36. Asecond such control bit in status register 71 is the cache enable bitwhich, when set, enables operation of instruction cache 36; conversely,when the cache enable bit is not set, instruction cache 36 is disabledto the extent that it is in no way accessed, regardless of the addressvalue on address lines 34a. During such time that the cache enable bitis not set, the contents of segment registers 144a and 144b, flag bits142, and the words within segments 140a and 140b themselves, are notalterable. The third such bit within status register 71 is the cachefreeze bit. When the cache freeze bit is set, only fetches frominstruction cache 36 are allowed in the event of cache "hits". In theevent of a cache "miss", however, no modification of flag bits 142,segment registers 144a and 144b, or LRU stack 152 is performed; theinstruction code fetch is merely performed from external memory withoutaffecting instruction cache 36.

Referring now to FIG. 8, the construction and operation of DMAcontroller 22 will be described. As is well known, direct memory accessoperations are useful in moving blocks of stored data from one memoryarea to another without intervention of the central processing unit(e.g., CPU 12). For microcomputer 10 described herein, direct memoryaccess is also useful for moving blocks of data between external memoryand on-chip memories 16 and 18. As shown in FIGS. 1 and 8, DMAcontroller 22 is connected to DMA bus 38 and to peripheral bus 28, forcommunication of data on DMA bus 28 and for receipt of control andsource/destination address information from peripheral bus 28.

It should be noted that peripheral bus 28 contains address lines 28a anddata lines 28d, which carry address information and data, respectively,in the same manner as data bus 30, program bus 34, and DMA bus 38discussed heretofore. Referring back to FIG. 1, it is apparent thataddress lines 28a and data lines 28d of peripheral bus 28 are directlyconnected, and therefore correspond, to the lines I/OA_(n) and I/OD_(n),respectively, at the output of peripheral port 26. Accordingly, in orderto present an address, or communicate data from or to, peripheral bus28, the desired address must correspond to a value within the memoryaddress space of microcomputer 10 which corresponds to an addressserviced by peripheral port 26. The memory-mapped registers within DMAcontroller which are described below are therefore within the memoryaddress space 800000_(h) through 800FFF_(h) referred to above in Table4.

DMA controller 22 contains control register 300, transfer counterregister 302, destination address register 304 and source addressregister 306, each of which are connected to address lines 28a and datalines 28d of peripheral bus 28, and each of which are mapped into uniqueaddress locations of the memory address space of microcomputer 10. DMAcontroller 22 further contains data register 308, which is connected todata lines 38d of DMA bus 38; address lines 38a of DMA bus are connectedto destination address register 304 and source address register 306.Control logic 310 is connected to control register 300 so that thecontents of the bits therein will effect the control of DMA controller22. Control logic 310 generates a signal to transfer counter register302 on line DECR and receives a signal from transfer counter register302 on line ZERO. Control logic 310 provides signals to destinationaddress register 304 and source register 306 on lines LOAD and INC/DECR;control logic further provides signals to data register 308 on linesWRITE and STORE. To effect the desired memory read/write operations,control logic 310 generates read/write signals which are connected tocontroller 14, so that controller 14 can generate such control signalsto memories 16, 18 and 20, and to peripheral ports 24 and 26, asdiscussed above relative to memory access control by controller 14.

Control register 300 is an eleven-bit addressable register which iswritten to in order to configure DMA controller 22. Each of the bitstherein will be described along with the description of the operationhereinbelow. Transfer counter register 302 is a twenty-four bitaddressable register, and which is to be loaded from peripheral bus 28with the number of memory locations to be transferred in the DMAoperation. Transfer counter register 302 is decremented by a pulse online DECR, and sends a signal to control logic 310 on line ZERO when itscontents equal zero. Source address register 306 and destination addressregister 304 are addressable twenty-four bit registers which store thememory addresses from and to which data are to be transferred,respectively. The contents of source address register 306 anddestination address register 304 are originally loaded from thetwenty-four least significant bits of data lines 28d of peripheral bus28; depending upon the contents of control register 300, source addressregister 306 and destination address register 304 are incremented ordecremented responsive to pulses on lines INC/DECR from control logic310. Data register 308 is a temporary register for buffering data fromdata lines 38d of DMA bus 38; the value on data lines 38d are loadedinto data register 308 responsive to a signal on line WRITE, and thecontents of data register 308 are presented to data lines 38d responsiveto a signal on line STORE.

Control logic 310 is further connected to controller 14, so that theoperation of DMA controller 22 is controlled consistently with theoperation of the rest of microcomputer 10. As will be evident below, theDMA can be interrupt synchronized, so that receipt or transmission ofdata from external sources can be done without conflict among CPU 12,DMA controller 22, and the external source. START bit 300a of controlregister 300 enables and disables the operation of DMA controller 22,depending upon having a "1" or "0" logic state, respectively. TC bit300b of control register 300 controls ready logic 310 so that, when TCbit 300b is set to a "1" state, the DMA transfer is terminated upontransfer counter register 302 reaching zero. Sync bits 300c and 300dallow configuration of the synchronization of DMA controller 22 witheither the source or destination of the transferred data. The contentsof bits 300e through 300h in control register 300 determine whether ornot the source and destination address registers 304 and 306 areincremented, decremented, or not modified after each transfer read.TCINT bit 300i, when set to a "1" state, creates an internal interruptwhen the contents of transfer counter register 302 reach zero. Controllogic 310 is connected to controller 14 to generate an internalinterrupt signal on line 312, and to respond to the interruptacknowledge signal from interrupt logic 250 on line 314.

The DMA operation performed under the control of DMA controller 22 canbe interrupt-driven in conjunction with controller 14, so that theoperation can be externally controlled. As described above relative tocontroller 14, internally generated interrupts are received and handledby interrupt logic 250 in controller 14. Control logic 310 furthergenerates an interrupt active signal therefrom on line 315. Theinterrupt request signal on line 313 indicates that DMA controller iswaiting for a DMA-related interrupt generated by an external device, andthe interrupt active signal on line 315 indicates that such an interrupthas been received by controller 14 and is to be serviced.Synchronization is controlled by control logic 310 generating theinterrupt request signal at predetermined points in the DMA transfercycle and waiting for the interrupt active signal before proceeding; theselection of the synchronization points is made by loading bits 300c and300d of control register 300. Table 5 lists the synchronization modesperformable by DMA controller 22.

                  TABLE 5                                                         ______________________________________                                        Bits 300c/d                                                                              Interrupt synchronization                                          ______________________________________                                        00         No interrupt synchronization.                                      01         Source synchronization; DMA read on                                           interrupt, write when available                                    10         Destination synchronization; DMA read                                         when available; write on interrupt                                 11         Source and destination sync; DMA read on                                      interrupt; write on next interrupt                                 ______________________________________                                    

In operation, transfer counter register 302, destination addressregister 304, and source register 306 are first loaded with the initialconditions as desired. Each of these registers 302, 304 and 306 areaddressable by address lines 28a of peripheral bus 28 using a normalmemory write instruction executed by microcomputer 10; implicit in FIG.8 for each of the registers 302, 304, and 306 is decoding logic forcontrolling the loading of said registers 302, 304 and 306 whenaddressed. Control register 300 is also loaded by addressing its memorylocation, thereby configuring DMA controller 22 as desired. Controllogic 310 is responsive to START bit 300a being set to a "1" state,enabling the operation of DMA controller 22.

By way of example, it will be assumed that control register 300 isloaded with the necessary data so that both destination address register304 and source address register 306 will be incremented during eachtransfer. Also for this example, the selected synchronization mode willbe destination synchronization. According to this example, control logic310 will first disable control logic 310 from sending internal interruptsignals to interrupt logic 250. Control logic 310 will then generate apulse on line LOAD to source register 306, and the contents of sourceregister 306 will be placed on address lines 38a of DMA bus 38.Consistent with the memory addressing explained above relative to FIGS.5 and 5a, the addressed memory location (either in external memory viaperipheral port 24, or in memories 16, 18 or 20) will be read. Controllogic 310 will pulse the WRITE line connected to data register 308, toload the value on data lines 38d of DMA bus 38 into data register 308.After the read operation, the contents of source register 306 will beincremented by control logic 310 via line INC/DECR.

According to the destination synchronization mode selected by controlregister 300, control logic 310 will now generate an interrupt requestsignal on line 313 to interrupt logic 250. Responsive to controller 14receiving an enabled interrupt directed to DMA, such an eventcommunicated to DMA controller by the interrupt active signal on line315, control logic 310 will begin the DMA write operation. Accordingly,the contents of destination register 304 will be presented upon addresslines 38a of DMA bus 38 responsive to control logic 310 presenting theLOAD signal to destination address register 304. Control logic 310 willalso pulse the STORE line connected to data register 308, so that thecontents of data register 308 will be presented upon data lines 38d ofDMA bus 38. The addressed memory location will be accessed as describedbefore, only with controller 14 providing the necessary write controlsignals to effect the writing of the contents of data register 308 intothe addressed location.

After completing the write, the contents of destination address register304 will be incremented by control logic 310 via line INC/DECR and thecontents of transfer counter register 302 will be decremented by controllogic 310 via line DECR; if the contents of transfer counter registerthen reach zero, control logic 310 will receive a signal on line ZERO,and will generate (or not generate) an interrupt on line 312 dependingupon the state of TCINT bit 300i of control register 300, alertingcontroller 14 of completion of the DMA operation. Of course, if the DMAoperation does not end by way of transfer counter register 302 reachingzero or by the interrupt control logic 310 will determine if START bit300a of control register 300 is at a "1" state and, if so, will beginthe next DMA transfer with the DMA read via source address register 306.

As is evident from this description, DMA controller is thus operable totransfer the contents of a series of memory locations from the block ofmemory beginning with the initial source address, to a series of memorylocations in a block of memory beginning with the destination address.This operation as described herein does not require the intervention ofCPU 12 and, since DMA bus 38 provides a separate address and data pathfor DMA purposes, can allow such a DMA operation to take placesimultaneously with program and data accesses in the normal operation ofmicrocomputer 10. DMA operations can occur essentially transparent tothe operation of microcomputer 10, greatly enhancing its performance.

Referring now to FIG. 9, the operation of peripheral bus 28, and itscommunication with various peripheral functions will be explained. Byway of example, timer 40, serial port 42 and format converter 44 are theperipheral functions connected to microcomputer 10 described herein.These three functions provide certain communication and/or dataprocessing functions depending upon their construction, but each of saidperipheral functions communicate with peripheral bus 28, and therebywith the rest of microcomputer 10, in the same manner. Each ofperipherals 40, 42, and 44 are configured and operated by microcomputer10 by using memory mapped registers, addressable by peripheral bus 28,in the manner described below. It should be recalled that, as in thecase of the memory-mapped registers contained within DMA controller 22,the memory-mapped registers contained in the peripheral functionsdescribed below reside in the input/output address space 800000_(h)through 8000FFF_(h) referred to above relative to Table 4.

Timer 40 performs the function of measuring predetermined time periodsfor external control, or for internal control of microcomputer 10. Timer40 contains timer logic 400, connected to address lines 28a ofperipheral bus 28; timer logic 400 is operable to evaluate the addresssignal on lines 28a of peripheral bus 28, and to allow access to thevarious memory-mapped registers within timer 40 accordingly. Each of theregisters within timer 40 (described below) are addressable by anaddress signal within the single address space of microcomputer 10. Thememory-mapped registers within timer 40 include a control register 402which, as is well known in the art, contains certain control informationnecessary to control the operation of timer 40, such as anenable/disable bit, and such as whether timer 40 is controlled by thesystem clock of microcomputer 10 to provide an external output, or iscontrolled by external clock pulses to provide an internal signal. Timer40 further contains addressable period register 404, which is loadedfrom data lines 28d with the value specifying the period of time to bemeasured by timer 40. Counter register 406 is also contained withintimer 40, and which is incremented by each pulse of either the systemclock or a clock pulse received on line TCLK externally. In operation,timer logic 400 is responsive to the contents of counter register 406equaling the contents of period register 404, at which time timer logic400 will generate an internal interrupt signal to controller 14 ifcontrol register 402 has so chosen; if control register 402 has selectedexternal output, timer logic 400 will generate a pulse on line TCLK whenthe contents of counter register 406 equal the contents of periodregister 404.

Serial port 42 transmits and receives data serially, as is well known inthe art, but is controlled by microcomputer 10 via memory-mappedregisters contained therein. Port logic 420 is contained within serialport 42, to control its operation and to allow access to thememory-mapped registers contained therein responsive to the addresssignals presented on address lines 28a of peripheral bus 28. An exampleof the construction and operation of a serial port such as serial port42 is given in copending application Ser. No. 927,883, filed Nov. 6,1986, and assigned to Texas Instruments Inc. Serial port 42, similarlyas timer 40, contains a control register 422 which allows configurationof the serial port for certain well-known purposes, such ascommunication of transmit ready and receive ready signals between CPU 12and serial port 42; such signals alert port logic 420 that CPU 12 iseither ready to transmit a word of information to serial port 42 viaperipheral bus 28, or ready to receive a word of information from serialport 42 via peripheral bus 28. Control register 422 further is useful tocommunicate control signals to and from external devices connected toserial port 42; it is of course understood that control register 422 mayindeed be realized by way of a plurality of addressable registers,depending upon the number of bits necessary and if a degree of addressindependence among such registers is desired. Serial port 42 furthercontains transmit register 424 and receive register 426, which areaddressable via peripheral bus 28, and which communicate the data to betransmitted or received. In operation, the rest of microcomputer 10 canaddress control register 422, indicating that a data word is ready fortransmission by serial port 42. CPU 12 will then present the address oftransmit register 424 upon address lines 28a of peripheral bus 28, andthe data to be transmitted upon data lines 28d of peripheral bus 28which is loaded into transmit register 424. Port logic 420 will thencontrol the serial output of the contents of transmit register 424 ontoserial transmit line DX, in conjunction with external control signalspresented thereto such as framing signals on line FSX, as is well knownin the art. Conversely, port logic 420 controls the loading of receiveregister 426 from line DR and generates an internal interrupt signal tointerrupt logic 250 in controller 14 when receive register 426 isfilled. CPU 12 then can read the contents of receive register 426 viadata lines 28d of peripheral bus 28, by presenting the addressassociated with receive register 426 on address lines 28a of peripheralbus 28.

Format converter 44 performs the function of conversion of data from onedata format to another. The encoding and decoding of data according tothe well known A-law, and u-law conventions is explained in saidcopending application Ser. No. 927,883. Format converter 44 containsformat logic 440 which controls access to the memory-mapped registerscontained therewithin according to the address signals on address lines28a of peripheral bus 28, and which performs the encoding and decodingfunctions upon the data. Format converter 44 further contains amemory-mapped control register 442, for communication of enable/disablecontrol bits, and of selection of the type of conversion desired, fromCPU 12 to format converter 44. Format converter 44 contains twomemory-mapped registers for the encoding of data, namely encode inputregister 444 and encode output register 446. CPU 12 provides input datato be encoded by addressing encode input register 444 by address lines28a and accordingly writing the data to be encoded onto data lines 28d,for loading into encode input register 444. After the encoding hasoccurred, CPU 12 can then receive the encoded data by addressing encodeoutput register 446 via address lines 28a, and reading the encoded datadata on data lines 28d of peripheral bus 28. Conversely, thecommunication of decoded data is performed in a similar manner by way ofdecode input register 448 and decode output register 449, similarlyaddressable by way of peripheral bus 28.

Certain modifications to the organization of peripherals alongperipheral bus 28 are of course obvious to one of ordinary skill in theart. The decoding of the address signals on lines 28a of peripheral bus28 described above is done by each of the peripherals by the logiccontained therein, i.e., by timer logic 400, port logic 420, and formatlogic 440. An alternative to this decoding scheme would provide apredecoder connected to address lines 28a of peripheral bus 28, whichwould decode the address signals presented thereupon, and communicateselection information to the individual peripherals connected alongperipheral bus 28. For example, if the address on address lines 28a weredirected to serial port 42, such a predecoder could enable serial port42 and disable the other peripherals; port logic 420 could then decodeless significant bits of the address signal on address lines 28a ofperipheral bus 28 to select the desired memory-mapped register therein.

In addition, it should be noted that the various peripherals alongperipheral bus 28 could easily be designed to communicate among oneanother without intervention from CPU 12 or the rest of microcomputer10, so long as no other access on peripheral bus 28 was being attempted.An example of such communication would be for communication of data fromserial port 42 to format converter 44 for encoding prior to transmissionby serial port 42 to an external device. One of ordinary skill in theart would be able to provide address driving logic to the logic withinthese peripherals to allow one to address a register in another viaaddress lines 28a, so that data could be communicated among theperipherals via data lines 28d.

The use of peripheral bus 28 for interconnection of the peripheralfunctions as described hereinabove further provides for significantflexibility in the adaptation of microcomputer 10 into different forms,merely by substitution or addition of additional peripheral functionsonto peripheral bus 28. Indeed, since peripheral bus 28 corresponds andis directly connected to lines I/OA_(n) and I/OD_(n) at the output ofperipheral port 26, and is thereby connected directly to externalterminals of microcomputer 10, software which is developed for externalperipheral functions may be used, with little or no modification, for amicrocomputer 10 which has the same function provided on-chip andconnected to peripheral bus 28. In this way, the development and de-bugof such new peripheral functions and features is facillitated to a greatextent by the architecture described hereinabove.

Although the invention has been described in detail herein withreference to its preferred embodiment, it is to be understood that thisdescription is by way of example only, and is not to be construed in alimiting sense. It is to be further understood that numerous changes inthe details of the embodiments of the invention, and additionalembodiments of the invention, will be apparent to, and may be made by,persons of ordinary skill in the art having reference to thisdescription. It is contemplated that such changes and additionalembodiments are within the spirit and true scope of the invention asclaimed below.

What is claimed is:
 1. A data processing device, comprising:a memory busfor communicating address and data signals; a memory, connected to saidmemory bus, and comprising a plurality of addressable memory locations;an arithmetic logic unit, connected to said memory bus, for executingarithmetic and logical operations on data, said data received on saidmemory bus responsive to address signals presented by said arithmeticlogic unit on said memory bus; a DMA bus, connected to said memory, forcommunicating address and data signals; and a DMA controller, connectedto said DMA bus, for reading a first memory location addressable by anaddress corresponding to a source address, and for writing the contentsof said first memory location to a second memory location, said secondmemory location addressable by an address corresponding to a destinationaddress.
 2. The data processing device of claim 1, furthercomprising:memory access logic, connected to said memory, to said memorybus, and to said DMA bus, for disconnecting said memory from one of saidbuses determined according to a predetermined priority responsive tosaid memory bus and said DMA bus concurrently addressing said memory. 3.The data processing device of claim 1, wherein said memory locations insaid memory are addressed by address signals on said memory bus and saidDMA bus having a value within a first set of addresses; and furthercomprising:a peripheral port, connected to said memory bus and to saidDMA bus, for presenting address signals and for presenting and receivingdata signals to and from external terminals of said data processingdevice, said peripheral port presenting only address signals on saidexternal terminals having a value within a second set of addresses, saidsecond set of addresses not overlapping said first set of addresses, sothat access is provided to memory locations connected to said externalterminals.
 4. The data processing device of claim 3, furthercomprising:memory access logic, connected to said memory, to said memorybus, and to said DMA bus, for disconnecting said memory from one of saidbuses if the address signal presented by said memory bus and the addresssignal presented by said DMA bus are both within said first set ofvalues, said disconnected one of said buses determined according to apredetermined priority.
 5. The data processing device of claim 4,wherein said memory access logic is also connected to said peripheralport, and is for disconnecting said peripheral port from one of saidbuses if the address signal presented by said memory bus and the addresssignal presented by said DMA bus are both within said second set ofvalues said disconnected one of said buses determined according to apredetermined priority.
 6. The data processing device of claim 1,wherein said DMA controller comprises:a source address register forstoring the address value of a first memory location; a destinationaddress register for storing the address value of a second memorylocation; a data register for storing data; and control logic, forconnecting said source address register and said data register to saidDMA bus so that the contents of said first memory location are stored insaid data register, and for connecting said destination address registerand said data register to said DMA bus, so that the contents of saiddata register are written to said second memory location.
 7. The dataprocessing device of claim 6, wherein said memory locations in saidmemory are addressed by address signals on said memory bus and said DMAbus having a value within a first set of addresses; and furthercomprising:a peripheral port, connected to said memory bus and to saidDMA bus, for presenting address signals and for presenting and receivingdata signals to and from external terminals of said data processingdevice, said peripheral port presenting only address signals on saidexternal terminals having a value within a second set of addresses, saidsecond set of addresses not overlapping said first set of addresses, sothat access is provided to memory locations connected to said externalterminals.
 8. The data processing device of claim 7, furthercomprising:memory access logic, connected to said memory, to said memorybus, and to said DMA bus, for disconnecting said memory from one of saidbuses if the address signal presented by said memory bus and the addresssignal presented by said DMA bus are both within said first set ofvalues, said disconnected one of said buses determined according to apredetermined priority.
 9. The data processing device of claim 8,wherein said memory access logic is also connected to said peripheralport, and is for disconnecting said peripheral port from one of saidbuses if the address signal presented by said memory bus and the addresssignal presented by said DMA bus are both within said second set ofvalues said disconnected one of said buses determined according to apredetermined priority.
 10. A data processing device, comprising:amemory bus for communicating address and data signals; a first memory,connected to said memory bus, and comprising a plurality of memorylocations addressable by address signals having a value within a firstset of addresses; a second memory, connected to said memory bus, andcomprising a plurality of memory locations addressable by addresssignals having a value within a second set of addresses, said second setof addresses not overlapping any of the addresses in said first set ofaddresses; an arithmetic logic unit, connected to said memory bus, forexecuting arithmetic and logical operations on data, said data receivedon said memory bus responsive to address signals presented by saidarithmetic logic unit on said memory bus; a DMA bus, connected to saidfirst and said second memories, for communicating address and datasignals; and a DMA controller, connected to said DMA bus, for reading afirst memory location addressable by an address corresponding to asource address, and for writing the contents of said first memorylocation to a second memory location, said second memory locationaddressable by an address corresponding to a destination address. 11.The data processing device of claim 10, further comprising:memory accesslogic, connected to said first memory, and to said memory bus and saidDMA bus, for disconnecting said first memory from said one of said busesif the address signal presented by said memory bus and the addresssignal presented by said DMA bus are both within said first set ofaddresses, said disconnected one of said buses determined according to apredetermined priority.
 12. The data processing device of claim 11,wherein said memory access logic is also connected to said secondmemory;and wherein said memory access logic is also for disconnectingsaid second memory from one of said buses if the address signalpresented by said memory bus and the address signal presented by saidDMA bus are both within said second set of addresses, said disconnectedone of said buses determined according to a predetermined priority. 13.The data processing device of claim 11, wherein said DMA controllercomprises:a source address register for storing the address value of afirst memory location; a destination address register for storing theaddress value of a second memory location; a data register for storingdata; and control logic, for connecting said source address register andsaid data register to said DMA bus so that the contents of said firstmemory location are stored in said data register, and for connectingsaid destination address register and said data register to said DMAbus, so that the contents of said data register are written to saidsecond memory location.
 14. The data processing device of claim 13,wherein said memory locations in said memory are addressed by addresssignals on said memory bus and said DMA bus having a value within afirst set of addresses; and further comprising:a peripheral port,connected to said memory bus and to said DMA bus, for presenting addresssignals and for presenting and receiving data signals to and fromexternal terminals of said data processing device, said peripheral portpresenting only address signals on said external terminals having avalue within a third set of addresses, said third set of addresses notoverlapping either said first set of addresses or said second set ofaddresses, so that access is provided to memory locations connected tosaid external terminals.
 15. The data processing device of claim 14,wherein said memory access logic is also connected to said peripheralport, and is for disconnecting said peripheral port from one of saidbuses if the address signal presented by said memory bus and the addresssignal presented by said DMA bus are both within said third set ofaddresses, said disconnected one of said buses determined according to apredetermined priority.
 16. A single-chip microcomputer having externalterminals and comprising:on-chip memory having memory sections havingmemory locations; direct memory access (DMA) controller means on-chipfor communicating blocks of data between memory sections in said on-chipmemory and to and from at least some of the external terminals of themicrocomputer, said direct memory access controller means including asource address register and a destination address register; arithmeticlogic means on-chip for communicating with said on-chip memory; andseparate memory bus and DMA bus means respectively connecting both saidarithmetic logic means and said direct memory access controller meanswith at least two sections of said on-chip memory.
 17. The single-chipmicrocomputer of claim 16 further comprising memory access logic meansfor permitting simultaneous access by said arithmetic logic means andsaid direct memory access controller means to different ones of saidmemory sections and for resolving attempted simultaneous access by saidarithmetic logic means and said direct memory access controller means tothe same memory section.
 18. The single-chip microcomputer of claim 16further comprising peripheral port means, connected to said memory busand to said DMA bus, for presenting and receiving data signals to andfrom the external terminals and for presenting only address signals onsaid external terminals having a value within a further set of addressesnot overlapping the addresses of the on-chip memory, so that access isprovided to memory locations connected to said external terminals.
 19. Adata processing system comprising:a single-chip microcomputer havingexternal terminals and including on-chip memory having memory sectionshaving memory locations, a direct memory access (DMA) controller on-chipto communicate blocks of data between memory sections in said on-chipmemory and to and from at least some of the external terminals of saidmicrocomputer, said direct memory access controller including a sourceaddress register and a destination address register, said microcomputeralso including an arithmetic logic unit on-chip, and separate memory busand DMA bus, said memory bus and said DMA bus respectively connectingsaid arithmetic logic unit and said direct memory access controller withat least two sections of said on-chip memory; and external memoryconnected to the external terminals, said microcomputer furtherincluding control circuitry connected to said memory bus, to said DMAbus and to said external terminals providing access to said externalmemory.
 20. A method of operating a data processing device having amemory having areas and comprising the steps of:directly accessing onearea of the memory to transfer blocks of data between areas of thememory via a DMA bus; and simultaneously accessing a different area ofthe memory via a memory bus to read data, executing arithmeticoperations thereon, and writing data back via said memory bus to thememory.
 21. The method of claim 20 further comprising the step ofsimultaneously controlling a peripheral port to transfer data betweenthe memory and peripheral means.
 22. The method of claim 21 furthercomprising the step of arbitrating accesses by the memory bus and DMAbus to the same area of the memory.
 23. A microcomputer systemcomprising:a memory bus; a direct memory access (DMA) bus; a peripheralport; a memory having memory locations; a DMA controller forbidirectionaly transferring data between the memory and the peripheralport via the DMA bus; and a central processing unit, comprising:anarithmetic logic unit connected to the memory for performing anarithmetic instruction on the data via the memory bus; and a controllercircuit for bidirectionally transferring data between the memory and thearithmetic logic unit.
 24. The microcomputer system of claim 23, whereinsaid peripheral port is accessible with address values not overlappingwith address values for addressing the memory.
 25. The microcomputersystem of claim 23, wherein said DMA controller further comprises:a setof addressable registers for reading a first memory location by anaddress corresponding to a source address, and for writing the contentsof said first memory location to a second memory location, said secondmemory location having an address corresponding to a destinationaddress.
 26. The microcomputer system of claim 23, wherein said memoryhas memory sections and said controller circuit further comprises:memoryaccess logic for disconnecting the memory from the memory bus or the DMAbus determined according to a predetermined priority responsive to thememory bus and the DMA bus concurrently accessing the same section ofthe memory.